-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·58 lines (54 loc) · 1.12 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3.9"
services:
fnano:
restart: unless-stopped
env_file:
- .env
build:
context: ./
dockerfile: ./dockerfiles/python311/Dockerfile
labels:
- fnano
volumes:
- .:/code
entrypoint:
- /bin/sh
- -c
- |
gunicorn app.main:app --workers ${NUM_WORKERS} \
--worker-class uvicorn.workers.UvicornWorker -b 0.0.0.0:6969 \
--timeout ${TIMEOUT}
ports:
- 6969:6969
depends_on:
- postgres
postgres:
image: postgres:12.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- 5432:5432
caddy:
image: caddy:2-alpine
container_name: caddy
restart: unless-stopped
env_file:
- .env
ports:
- "$PORT:$PORT"
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- fnano
volumes:
caddy_data:
caddy_config:
postgres_data: