add a worker to the dev docker compose
This commit is contained in:
1 parent
f43bf9ab3d
commit
b21ef60cda
1 file changed
+25
@@ -20,9 +20,34 @@ services:
|
|||||||
- server.env
|
- server.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
- mongodb
|
||||||
|
worker:
|
||||||
|
image: uptime_server:latest
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "52346:52346"
|
||||||
|
env_file:
|
||||||
|
- server.env
|
||||||
|
environment:
|
||||||
|
QUEUE_MODE: "worker"
|
||||||
|
HEALTH_PORT: "52346"
|
||||||
|
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:
|
mongodb:
|
||||||
image: uptime_mongo:latest
|
image: uptime_mongo:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
command: ["mongod", "--quiet", "--bind_ip_all"]
|
command: ["mongod", "--quiet", "--bind_ip_all"]
|
||||||
volumes:
|
volumes:
|
||||||
- ./mongo/data:/data/db
|
- ./mongo/data:/data/db
|
||||||
|
|||||||
Reference in new issue
Block a user