parent
ba9feb4815
commit
0d633ab782
@ -0,0 +1,22 @@ |
||||
FROM python:3.8-slim |
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \ |
||||
make \ |
||||
gcc \ |
||||
git \ |
||||
python3-dev \ |
||||
libffi-dev \ |
||||
libpq-dev \ |
||||
libyaml-dev |
||||
|
||||
ADD src/requirements.txt /requirements.txt |
||||
|
||||
RUN pip3 install -r /requirements.txt |
||||
|
||||
ADD src /fosspay |
||||
RUN cd /fosspay && \ |
||||
make |
||||
|
||||
ENV GUNICORN_CMD_ARGS "--bind 0.0.0.0:5000 --workers 2 --chdir /fosspay" |
||||
|
||||
CMD ["/usr/local/bin/gunicorn", "app:app"] |
@ -0,0 +1,66 @@ |
||||
version: "2.4" |
||||
|
||||
networks: |
||||
fosspay: |
||||
driver: bridge |
||||
driver_opts: |
||||
com.docker.network.bridge.name: br-fosspay |
||||
com.docker.network.driver.mtu: 1420 |
||||
enable_ipv6: false |
||||
|
||||
volumes: |
||||
postgres-data: |
||||
|
||||
services: |
||||
server: |
||||
restart: always |
||||
build: . |
||||
ports: |
||||
- "5000:5006" |
||||
networks: |
||||
- fosspay |
||||
links: |
||||
- postgres |
||||
volumes: |
||||
- ./config.ini:/fosspay/config.ini:ro |
||||
depends_on: |
||||
- postgres |
||||
|
||||
postgres: |
||||
image: postgres:11-alpine |
||||
restart: always |
||||
networks: |
||||
fosspay: |
||||
aliases: |
||||
- db |
||||
volumes: |
||||
- postgres-data:/var/lib/postgresql/data |
||||
env_file: env.postgres |
||||
|
||||
nginx: |
||||
image: nginx:alpine |
||||
ports: |
||||
- 8006:8006 |
||||
- 4448:4448 |
||||
restart: always |
||||
networks: |
||||
- fosspay |
||||
depends_on: |
||||
- server |
||||
volumes: |
||||
- /etc/localtime:/etc/localtime:ro |
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro |
||||
- ./run/letsencrypt/conf/:/etc/letsencrypt |
||||
- ./run/letsencrypt/html/:/tmp/letsencrypt |
||||
|
||||
letsencrypt: |
||||
image: vdhpieter/letsencrypt-webroot |
||||
restart: always |
||||
networks: |
||||
- fosspay |
||||
volumes: |
||||
- /etc/localtime:/etc/localtime:ro |
||||
- /var/run/docker.sock:/var/run/docker.sock |
||||
- ./run/letsencrypt/conf/:/etc/letsencrypt |
||||
- ./run/letsencrypt/html/:/tmp/letsencrypt |
||||
env_file: env.letsencrypt |
Loading…
Reference in new issue