generated from 0xTheProDev/fastapi-clean-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.no-db.yml
91 lines (85 loc) · 2.05 KB
/
docker-compose.no-db.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
services:
nginx-proxy:
image: jwilder/nginx-proxy:latest
container_name: nginx_proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ${CERT_PATH:-/opt/friday-api/certs}:/etc/nginx/certs:rw
- nginx_vhost:/etc/nginx/vhost.d
- nginx_html:/usr/share/nginx/html
depends_on:
- api
networks:
- proxy-tier
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx_proxy_le
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${CERT_PATH:-/opt/friday-api/certs}:/etc/nginx/certs:rw
- nginx_vhost:/etc/nginx/vhost.d
- nginx_html:/usr/share/nginx/html
- ${CERT_PATH:-/opt/friday-api/certs}:/etc/acme.sh:rw
depends_on:
- nginx-proxy
networks:
- proxy-tier
environment:
NGINX_PROXY_CONTAINER: "nginx_proxy"
ACME_CA_URI: "https://acme-v02.api.letsencrypt.org/directory"
api:
build: .
container_name: friday_api
restart: always
env_file:
- .env
# We remove "depends_on: - db" because there's no local MySQL in this version
depends_on:
- redis
environment:
- VIRTUAL_HOST=${FRIDAY_DOMAIN}
- LETSENCRYPT_HOST=${FRIDAY_DOMAIN}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
- REDIS_HOST=redis
volumes:
- ./logs:/app/logs
networks:
- proxy-tier
- default
worker:
build: .
container_name: friday_worker
restart: always
depends_on:
- redis
env_file:
- .env
command: bash -c "PYTHONPATH=/app python -m infrastructure.queue.run_worker"
environment:
- REDIS_HOST=redis
volumes:
- ./logs:/app/logs
networks:
- default
redis:
image: redis:6.2-alpine
container_name: friday_redis
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- default
networks:
proxy-tier:
default:
volumes:
redis_data:
nginx_vhost:
nginx_html: