-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (34 loc) · 796 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
37 lines (34 loc) · 796 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
version: '3.8'
services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: dough
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
frontend:
build:
context: ./frontend/my-app
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
- postgres
backend:
build:
context: ./backend
dockerfile: Dockerfile.backend
environment:
DATABASE_URL: postgresql://user:password@postgres:5432/dough
depends_on:
- postgres
ports:
- "8000:8000"
command: [ "./wait-for-it.sh", "postgres:5432", "--", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000" ]
volumes:
db_data:
db_test_data: