-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 1 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
version: "3.8"
services:
db:
container_name: changd-db
image: postgres:alpine
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=password
# ports:
# - 5432:5432
volumes:
- ./server/db_script/changd.sql:/docker-entrypoint-initdb.d/changd.sql
- ./server/data/db:/var/lib/postgresql@14/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
api:
container_name: changd-api
restart: unless-stopped
depends_on:
db:
condition: service_healthy
build:
context: ./server
dockerfile: Dockerfile
# ports:
# - ${PORT_API-8000}:8000
volumes:
- /app/node_modules
ui_server:
container_name: changd-ui
image: nginx:alpine
restart: unless-stopped
depends_on:
- api
ports:
- ${PORT-80}:80
volumes:
- ./frontend/build:/usr/share/nginx/html
- ./frontend/nginx/default.conf:/etc/nginx/conf.d/default.conf