-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.25 KB
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
services:
db:
build:
context: ./postgres
dockerfile: Dockerfile
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_DB: travel_db
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --lc-collate=ru_RU.UTF-8 --lc-ctype=ru_RU.UTF-8"
command: ["postgres", "-c", "lc_monetary=ru_RU.UTF-8", "-c", "lc_numeric=ru_RU.UTF-8", "-c", "lc_time=ru_RU.UTF-8"]
volumes:
- pgdata:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d travel_db"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://admin:admin@db:5432/travel_db
TZ: Europe/Moscow
depends_on:
db:
condition: service_healthy
volumes:
- ./backend/app:/app/app
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
VITE_API_BASE_URL: http://backend:8000
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
volumes:
pgdata: