forked from huhusmang/Subscription-Management
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
29 lines (27 loc) · 834 Bytes
/
docker-compose.yml
File metadata and controls
29 lines (27 loc) · 834 Bytes
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
version: '3.8'
services:
subscription-manager:
build:
context: .
dockerfile: Dockerfile
container_name: subscription-manager
ports:
- "${PORT:-3001}:${PORT:-3001}"
volumes:
- subscription-data:/app/data
environment:
- API_KEY=${API_KEY}
- NODE_ENV=production
- PORT=${PORT:-3001}
- BASE_CURRENCY=${BASE_CURRENCY:-CNY}
- TIANAPI_KEY=${TIANAPI_KEY}
- DATABASE_PATH=${DATABASE_PATH:-/app/data/database.sqlite}
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "const http=require('http');http.get('http://localhost:${PORT:-3001}/api/health',res=>process.exit(res.statusCode===200?0:1)).on('error',()=>process.exit(1));"]
interval: 30s
timeout: 3s
retries: 3
volumes:
subscription-data:
driver: local