-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
45 lines (42 loc) · 1.13 KB
/
docker-compose.yaml
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
# this docker compose file is used for local development ONLY,
# hence the environment variables are set here.
# we deploy our application manually using Cloud Run (GCP).
version: '3'
services:
frontend:
build:
context: ./frontend
dockerfile: dockerfile.dev
ports:
- "5173:5173"
backend:
build:
context: ./backend
dockerfile: dockerfile.dev
ports:
- "5000:5000"
environment:
- FLASK_RUN_HOST=0.0.0.0
- FLASK_RUN_PORT=5000
- DATABASE_URL=postgresql://username:password@db:5432/music_composer
- SECRET_KEY=9c77b62fd66e33db11d4e6e088d77e0d014151091fd40d85392a412a47bc4003
- CORS_ORIGINS=http://localhost:5173
depends_on:
db:
condition: service_healthy
volumes:
- ./backend:/app/backend
- /app/backend/__pycache__/
db:
image: postgres
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=username
- POSTGRES_DB=music_composer
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U username -d music_composer"]
interval: 10s
timeout: 5s
retries: 4