Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
|
4b5a861360 | 1 year ago |
|
804eb5544f | 2 years ago |
|
9f308af6b0 | 2 years ago |
|
c29903b394 | 2 years ago |
|
ddce943c33 | 3 years ago |
|
4a4b03836d | 4 years ago |
|
fd2c7c00dc | 4 years ago |
|
f8cd066ef2 | 4 years ago |
|
0041f06ff1 | 4 years ago |
|
5fa3908c72 | 4 years ago |
@ -1 +1,2 @@ |
|||||||
LOCAL_CODE_ROOT=/var/www/http |
LOCAL_CODE_ROOT=/Users/tradewind/Projects |
||||||
|
PROJECT_PATH=/Users/tradewind/Projects/example |
||||||
|
@ -1,4 +1,5 @@ |
|||||||
.idea |
.idea |
||||||
*.iml |
*.iml |
||||||
log |
log |
||||||
.env |
.env |
||||||
|
.DS_Store |
@ -0,0 +1,17 @@ |
|||||||
|
FROM node:latest |
||||||
|
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
libgtkextra-dev \ |
||||||
|
libgconf2-dev \ |
||||||
|
libnss3 \ |
||||||
|
libasound2 \ |
||||||
|
libxtst-dev \ |
||||||
|
libxss1 \ |
||||||
|
libatk-bridge2.0-0 \ |
||||||
|
libgtk-3.0 \ |
||||||
|
libgbm-dev \ |
||||||
|
&& apt-get clean \ |
||||||
|
&& apt-get autoclean |
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@ |
|||||||
|
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so |
||||||
|
xdebug.mode=debug |
||||||
|
xdebug.client_host=host.docker.internal |
||||||
|
xdebug.client_port=9003 |
||||||
|
xdebug.idekey=PHPSTORM |
@ -0,0 +1,48 @@ |
|||||||
|
FROM php:7.1-fpm |
||||||
|
|
||||||
|
#ARG PROJECT_PATH |
||||||
|
#WORKDIR ${PROJECT_PATH} |
||||||
|
|
||||||
|
WORKDIR /opt/project |
||||||
|
|
||||||
|
RUN sed -i "s@http://deb.debian.org@http://mirrors.tencent.com@g" /etc/apt/sources.list |
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
git \ |
||||||
|
zip \ |
||||||
|
unzip \ |
||||||
|
libpq-dev \ |
||||||
|
libzip-dev \ |
||||||
|
libpng-dev \ |
||||||
|
libfreetype6-dev \ |
||||||
|
libxml2-dev \ |
||||||
|
libicu-dev \ |
||||||
|
libjpeg62-turbo-dev \ |
||||||
|
&& docker-php-ext-configure intl \ |
||||||
|
&& docker-php-ext-configure pcntl --enable-pcntl \ |
||||||
|
&& docker-php-ext-install -j$(nproc) \ |
||||||
|
bcmath \ |
||||||
|
pdo_mysql \ |
||||||
|
pdo_pgsql \ |
||||||
|
gd \ |
||||||
|
zip \ |
||||||
|
exif \ |
||||||
|
sockets \ |
||||||
|
intl \ |
||||||
|
soap \ |
||||||
|
pcntl \ |
||||||
|
&& pecl install \ |
||||||
|
redis \ |
||||||
|
xdebug-2.9.8 \ |
||||||
|
# mongodb \ |
||||||
|
&& docker-php-ext-enable \ |
||||||
|
redis \ |
||||||
|
xdebug \ |
||||||
|
# mongodb \ |
||||||
|
&& apt-get clean \ |
||||||
|
&& apt-get autoclean |
||||||
|
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer |
||||||
|
|
||||||
|
# 修改 composer 为国内镜像 |
||||||
|
RUN composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@ |
|||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||||
|
|
||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||||
|
|
||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
@ -0,0 +1,5 @@ |
|||||||
|
zend_extension=xdebug |
||||||
|
xdebug.mode=debug |
||||||
|
xdebug.client_host=host.docker.internal |
||||||
|
xdebug.client_port=9003 |
||||||
|
xdebug.idekey=PHPSTORM |
@ -1,44 +1,47 @@ |
|||||||
FROM php:7.4-fpm-alpine |
FROM php:7.4-fpm |
||||||
|
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories |
ARG PROJECT_PATH |
||||||
|
|
||||||
RUN apk add --no-cache --virtual .build-deps \ |
WORKDIR ${PROJECT_PATH} |
||||||
$PHPIZE_DEPS \ |
|
||||||
curl-dev \ |
|
||||||
imagemagick-dev \ |
|
||||||
libtool \ |
|
||||||
libxml2-dev \ |
|
||||||
postgresql-dev \ |
|
||||||
sqlite-dev \ |
|
||||||
&& apk add --no-cache \ |
|
||||||
curl \ |
|
||||||
git \ |
|
||||||
imagemagick \ |
|
||||||
mysql-client \ |
|
||||||
postgresql-libs \ |
|
||||||
openssl \ |
|
||||||
libzip-dev \ |
|
||||||
&& pecl install imagick \ |
|
||||||
&& docker-php-ext-enable imagick \ |
|
||||||
&& pecl install xdebug-3.0.4 \ |
|
||||||
&& docker-php-ext-enable xdebug \ |
|
||||||
&& docker-php-ext-install \ |
|
||||||
curl \ |
|
||||||
iconv \ |
|
||||||
pdo \ |
|
||||||
pdo_mysql \ |
|
||||||
pdo_pgsql \ |
|
||||||
pdo_sqlite \ |
|
||||||
pcntl \ |
|
||||||
tokenizer \ |
|
||||||
xml \ |
|
||||||
zip \ |
|
||||||
&& curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ |
|
||||||
&& apk del -f .build-deps |
|
||||||
|
|
||||||
RUN apk --no-cache add shadow && \ |
RUN sed -i "s@http://deb.debian.org@http://mirrors.tencent.com@g" /etc/apt/sources.list |
||||||
usermod -u 1000 www-data && \ |
|
||||||
groupmod -g 1000 www-data |
RUN apt-get update && apt-get install -y \ |
||||||
|
git \ |
||||||
|
zip \ |
||||||
|
unzip \ |
||||||
|
libpq-dev \ |
||||||
|
libzip-dev \ |
||||||
|
libpng-dev \ |
||||||
|
libfreetype6-dev \ |
||||||
|
libxml2-dev \ |
||||||
|
libicu-dev \ |
||||||
|
libjpeg62-turbo-dev \ |
||||||
|
&& docker-php-ext-configure intl \ |
||||||
|
&& docker-php-ext-configure pcntl --enable-pcntl \ |
||||||
|
&& docker-php-ext-install -j$(nproc) \ |
||||||
|
bcmath \ |
||||||
|
pdo_mysql \ |
||||||
|
pdo_pgsql \ |
||||||
|
gd \ |
||||||
|
zip \ |
||||||
|
exif \ |
||||||
|
sockets \ |
||||||
|
intl \ |
||||||
|
soap \ |
||||||
|
pcntl \ |
||||||
|
&& pecl install \ |
||||||
|
redis \ |
||||||
|
xdebug-3.1.6 \ |
||||||
|
# mongodb \ |
||||||
|
&& docker-php-ext-enable \ |
||||||
|
redis \ |
||||||
|
xdebug \ |
||||||
|
# mongodb \ |
||||||
|
&& apt-get clean \ |
||||||
|
&& apt-get autoclean |
||||||
|
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer |
||||||
|
|
||||||
# 修改 composer 为国内镜像 |
# 修改 composer 为国内镜像 |
||||||
RUN composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/ |
RUN composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/ |
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,10 @@ |
|||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse |
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse |
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse |
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse |
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse |
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse |
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
@ -0,0 +1,5 @@ |
|||||||
|
zend_extension=xdebug |
||||||
|
xdebug.mode=debug |
||||||
|
xdebug.client_host=host.docker.internal |
||||||
|
xdebug.client_port=9003 |
||||||
|
xdebug.idekey=PHPSTORM |
@ -0,0 +1,43 @@ |
|||||||
|
FROM php:8.3-fpm |
||||||
|
|
||||||
|
ARG PROJECT_PATH |
||||||
|
|
||||||
|
WORKDIR ${PROJECT_PATH} |
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
git \ |
||||||
|
zip \ |
||||||
|
unzip \ |
||||||
|
libpq-dev \ |
||||||
|
libzip-dev \ |
||||||
|
libpng-dev \ |
||||||
|
libfreetype6-dev \ |
||||||
|
libxml2-dev \ |
||||||
|
libicu-dev \ |
||||||
|
libjpeg62-turbo-dev \ |
||||||
|
&& docker-php-ext-configure intl \ |
||||||
|
&& docker-php-ext-configure pcntl --enable-pcntl \ |
||||||
|
&& docker-php-ext-install -j$(nproc) \ |
||||||
|
bcmath \ |
||||||
|
pdo_mysql \ |
||||||
|
pdo_pgsql \ |
||||||
|
gd \ |
||||||
|
zip \ |
||||||
|
exif \ |
||||||
|
sockets \ |
||||||
|
intl \ |
||||||
|
soap \ |
||||||
|
pcntl \ |
||||||
|
&& pecl install \ |
||||||
|
redis \ |
||||||
|
xdebug \ |
||||||
|
&& docker-php-ext-enable \ |
||||||
|
redis \ |
||||||
|
xdebug \ |
||||||
|
&& apt-get clean \ |
||||||
|
&& apt-get autoclean |
||||||
|
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer |
||||||
|
|
||||||
|
# 修改 composer 为国内镜像 |
||||||
|
RUN composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/ |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@ |
|||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free |
||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free |
||||||
|
|
||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free |
||||||
|
|
||||||
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
||||||
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free |
@ -0,0 +1,24 @@ |
|||||||
|
FROM python:3.9-alpine3.13 as build |
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ |
||||||
|
&& apk update \ |
||||||
|
&& apk add git gcc g++ musl-dev libffi-dev libressl-dev make |
||||||
|
WORKDIR /install |
||||||
|
COPY requirements.txt /install/requirements.txt |
||||||
|
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /install/requirements.txt \ |
||||||
|
&& mkdir -p /install/lib/python3.9/site-packages \ |
||||||
|
&& cp -rp /usr/local/lib/python3.9/site-packages /install/lib/python3.9 \ |
||||||
|
&& cp -p /usr/local/bin/uvicorn /install/uvicorn |
||||||
|
|
||||||
|
|
||||||
|
FROM python:3.9-alpine3.13 |
||||||
|
|
||||||
|
# This hack is widely applied to avoid python printing issues in docker containers. |
||||||
|
# See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13 |
||||||
|
ENV PYTHONUNBUFFERED=1 |
||||||
|
|
||||||
|
COPY --from=build /install/lib /usr/local/lib |
||||||
|
COPY --from=build /install/uvicorn /usr/local/bin/uvicorn |
||||||
|
|
||||||
|
WORKDIR /code |
||||||
|
|
||||||
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] |
@ -0,0 +1,6 @@ |
|||||||
|
fastapi |
||||||
|
python-multipart |
||||||
|
python_jose[cryptography] |
||||||
|
SQLAlchemy[sqlite] |
||||||
|
uvicorn[standard] |
||||||
|
passlib[bcrypt] |
Loading…
Reference in new issue