-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
45 lines (42 loc) · 1.04 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
#version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: abc-journal
restart: unless-stopped
ports:
- "${PORT:-3100}:${PORT:-3100}"
environment:
- NODE_ENV=production
- PORT=${PORT:-3100}
- JWT_SECRET=${JWT_SECRET}
- GEMINI_API_KEY=${GEMINI_API_KEY}
- DATABASE_PATH=/app/data/abc-journal.db
volumes:
# Persist database outside container
- abc-data:/app/data
networks:
- abc-network
healthcheck:
test: ["CMD", "sh", "-c", "node -e \"require('http').get('http://localhost:' + (process.env.PORT || 3100) + '/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})\""]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
abc-data:
driver: local
driver_opts:
type: none
device: ${DATA_PATH:-./data}
o: bind
networks:
abc-network:
driver: bridge