-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.27 KB
/
docker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.27 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
services:
postgres:
image: postgres:17-alpine
container_name: upwork_postgres
restart: unless-stopped
ports:
- '5432:5432'
environment:
POSTGRES_USER: ${POSTGRES_USER:-admin}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-admin}
POSTGRES_DB: ${POSTGRES_DB:-demo_db}
volumes:
- ./.sql:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-admin}']
interval: 5s
timeout: 3s
retries: 5
express-app:
build: ./express-app
container_name: upwork_express
restart: unless-stopped
ports:
- '4000:4000'
env_file:
- ./express-app/.env
depends_on:
postgres:
condition: service_healthy
networks:
- app-network
nextjs:
build: ./nextjs
container_name: upwork_nextjs
restart: unless-stopped
ports:
- '3000:3000'
env_file:
- ./nextjs/.env
depends_on:
- express-app
networks:
- app-network
networks:
app-network:
driver: bridge