-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
39 lines (35 loc) · 902 Bytes
/
docker-compose.prod.yml
File metadata and controls
39 lines (35 loc) · 902 Bytes
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
version: '3.8'
services:
db:
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
api:
restart: always
build:
context: ./backend
dockerfile: Dockerfile
depends_on:
- db
environment:
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- DATABASE_SYNC_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- SECRET_KEY=${SECRET_KEY}
- CORS_ORIGINS=${CORS_ORIGINS}
- DEBUG=false
volumes:
- ./data/uploads:/data/uploads
frontend:
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
env_file: .env
ports:
- "80:80"
volumes:
postgres_data: