-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (41 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
41 lines (41 loc) · 1.15 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
services:
postgres:
container_name: database
image: postgres:18-alpine
ports:
- "5431:5432"
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./docker_test_db:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 5s
timeout: 60s
retries: 5
start_period: 80s
server:
container_name: server
build:
context: ./server
dockerfile: Dockerfile
ports:
- "7999:8000"
environment:
DATABASE_URL: "${DATABASE_URL}"
PORT: "${SERVER_PORT}"
depends_on:
postgres:
condition: service_healthy
client:
container_name: client
build:
context: ./client
dockerfile: Dockerfile
command: ["sh", "-c", "npm run preview"]
ports:
- "4172:4173"
depends_on:
- server