-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.44 KB
/
docker-compose.yml
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
57
58
59
60
61
62
63
64
65
66
version: "3.9"
services:
react-app:
image: traebuilds/frontend
container_name: trae_front
ports:
- '3000:80'
environment:
- VITE_BACK_API_URL=http://195.80.51.155:8088/api
- TZ="Europe/Moscow"
networks:
- trae-net
depends_on:
- backend
backend:
image: traebuilds/backend
container_name: trae_back
ports:
- "8088:8088"
- "5005:5005" #debug port
environment:
- "TZ=Europe/Moscow"
- "SPRING_PROFILES_ACTIVE=prod"
- "POSTGRES_URL=${PG_URL}"
- "POSTGRES_USER=${PG_USER}"
- "POSTGRES_PASS=${PG_PASSWORD}"
- "JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}"
- "JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET}"
networks:
- trae-net
depends_on:
- postgres-backend
postgres-backend:
image: postgres:15.2
container_name: postgres_db
ports:
- "${PG_PORT}:${PG_PORT}"
command: -p ${PG_PORT}
environment:
TZ: "Europe/Moscow"
PGUSER: "${PG_USER}"
POSTGRES_USER: "${PG_USER}"
POSTGRES_PASSWORD: "${PG_PASSWORD}"
POSTGRES_DB: "${PG_DB}"
volumes:
- "database:/var/lib/postgresql/data"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${PG_USER} -d ${PG_DB}" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: on-failure
networks:
- trae-net
volumes:
database:
networks:
trae-net:
name: trae-net
driver: bridge