62 lines
1.4 KiB
YAML
Executable File
62 lines
1.4 KiB
YAML
Executable File
services:
|
|
client:
|
|
image: uptime_client:latest
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
environment:
|
|
UPTIME_APP_API_BASE_URL: "http://localhost:52345/api/v1"
|
|
UPTIME_APP_CLIENT_HOST: "http://localhost"
|
|
volumes:
|
|
- ./nginx/conf.d:/etc/nginx/conf.d/
|
|
depends_on:
|
|
- server
|
|
server:
|
|
image: uptime_server:latest
|
|
restart: always
|
|
ports:
|
|
- "52345:52345"
|
|
env_file:
|
|
- server.env
|
|
depends_on:
|
|
- mongodb
|
|
worker:
|
|
image: uptime_server:latest
|
|
restart: always
|
|
ports:
|
|
- "52346:52346"
|
|
env_file:
|
|
- server.env
|
|
environment:
|
|
QUEUE_MODE: "worker"
|
|
HEALTH_PORT: "52346"
|
|
stop_grace_period: 30s
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"node",
|
|
"-e",
|
|
"require('http').get('http://localhost:52346/livez',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))",
|
|
]
|
|
interval: 15s
|
|
timeout: 3s
|
|
retries: 3
|
|
depends_on:
|
|
- mongodb
|
|
mongodb:
|
|
image: uptime_mongo:latest
|
|
restart: always
|
|
ports:
|
|
- "27017:27017"
|
|
command: ["mongod", "--quiet", "--bind_ip_all"]
|
|
volumes:
|
|
- ./mongo/data:/data/db
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')", "--quiet"]
|
|
interval: 5s
|
|
timeout: 30s
|
|
start_period: 0s
|
|
start_interval: 1s
|
|
retries: 30
|