forked from RomainDreidemy/MT5-EasyDocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 979 Bytes
/
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
services:
front:
container_name: front
build:
context: ./front
dockerfile: Dockerfile
volumes:
- ./front/:/app
- /app/node_modules
- ./.env:/app/.env
ports:
- "${FRONT_PORT}:3000"
entrypoint: ["yarn", "start"]
api:
container_name: api
build:
context: ./api
dockerfile: Dockerfile
volumes:
- ./api/:/app
- ./.env:/app/.env
ports:
- "${API_PORT}:3000"
depends_on:
database:
condition: service_healthy
database:
container_name: database
image: postgres:15
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- ./tmp/database:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 10