-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
52 lines (50 loc) · 1.21 KB
/
docker-compose.yaml
File metadata and controls
52 lines (50 loc) · 1.21 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
52
version: "3.8"
services:
api:
build:
context: https://github.com/NeotomaDB/tilia_api.git#feature/dockercompose
dockerfile: Dockerfile
container_name: node-express-tiliaapi
restart: unless-stopped
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- RDS_HOSTNAME=db-proxy
- RDS_PORT=5432
- RDS_DATABASE=${RDS_DATABASE}
- RDS_USERNAME=${RDS_USERNAME}
- RDS_PASSWORD=${RDS_PASSWORD}
- DB_SSL=true
- PORT=3001
- API_URL=http://localhost:3001
depends_on:
- db-proxy
networks:
- app-network
volumes:
- ./logs:/app/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/healthcheck"]
interval: 30s
timeout: 10s
retries: 3
db-proxy:
image: alpine/socat:latest
container_name: db-proxy
restart: unless-stopped
command: >
tcp-listen:5432,fork,reuseaddr
tcp-connect:host.docker.internal:${RDS_PORT}
networks:
- app-network
extra_hosts:
- "host.docker.internal:host-gateway"
# Custom network configuration
networks:
app-network:
driver: bridge
# Named volumes for data persistence
volumes:
app-logs:
driver: local