-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
56 lines (52 loc) · 1.09 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
46
47
48
49
50
51
52
53
54
55
56
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_APP_BACKEND_ADDRESS=${VITE_API_URL:-http://localhost:8000}
container_name: frontend
restart: always
ports:
- 3000:3000
networks:
- network
env_file:
- ./frontend/.env
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: backend
entrypoint: ./scripts/init_db.sh
ports:
- 8000:8000
networks:
- network
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql+asyncpg://user:password@postgres:5432/madr_db}
depends_on:
- postgres
env_file:
- ./backend/.env
postgres:
image: postgres:latest
container_name: postgres
restart: always
ports:
- 5432:5432
networks:
- network
environment:
POSTGRES_USER: user
POSTGRES_DB: madr_db
POSTGRES_PASSWORD: password
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- ./backend/.env
networks:
network:
driver: bridge
volumes:
postgres_data: