-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
62 lines (57 loc) · 1.11 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
59
60
61
62
version: '3'
volumes:
base-data:
db-data:
nginx-data:
redis-data:
services:
db:
image: postgres:15-alpine
env_file:
- .env
restart: always
ports:
- '5431:5432'
volumes:
- db-data:/var/lib/postgresql/data
backend:
restart: always
env_file:
- .env
build:
context: ./backend
dockerfile: ./Dockerfile
args:
env: ${ENV:-dev}
ports:
- "8666:8000"
command: |
bash -c "
while !</dev/tcp/db/5432; do sleep 1; done;
alembic upgrade head &&
uvicorn src.main:app --reload --workers 1 --host 0.0.0.0 --port 8000 --log-config=logconfig.yml"
depends_on:
- db
environment:
- PYTHONUNBUFFERED=0
volumes:
- base-data:/data
- ./backend/:/code
nginx:
restart: always
ports:
- "0.0.0.0:80:80"
env_file:
- .env
build:
context: ./nginx
dockerfile: ./Dockerfile
volumes:
- nginx-data:/etc/letsencrypt
redis:
restart: always
image: redis:latest
ports:
- "6479:6379"
volumes:
- redis-data:/data