-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
51 lines (48 loc) · 1.31 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
volumes:
pgdata:
services:
backend:
hostname: backend-${TARGET_ENV}
image: ${REGISTRY_PREFIX}/molevolvr-backend:${IMAGE_TAG}
platform: linux/amd64
build:
context: ./backend
dockerfile: ./docker/Dockerfile
args:
- PRIOR_LAYER=backend-base
cache_from:
- type=registry,ref=${REGISTRY_PREFIX}/molevolvr-backend:${IMAGE_TAG}
cache_to:
- type=inline,ref=${REGISTRY_PREFIX}/molevolvr-backend:${IMAGE_TAG},mode=max
env_file:
- .env
environment:
- API_PORT=9050
- "POSTGRES_HOST=db"
depends_on:
db:
condition: service_healthy
frontend:
hostname: frontend-${TARGET_ENV}
image: ${REGISTRY_PREFIX}/molevolvr-frontend:${IMAGE_TAG}
build:
context: ./frontend
cache_from:
- type=registry,ref=${REGISTRY_PREFIX}/molevolvr-frontend:${IMAGE_TAG}
cache_to:
- type=inline,ref=${REGISTRY_PREFIX}/molevolvr-frontend:${IMAGE_TAG},mode=max
depends_on:
- backend
db:
hostname: ${POSTGRES_HOST}
image: postgres:16
env_file:
- .env
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s