You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
701 B
40 lines
701 B
5 years ago
|
version: "3.6"
|
||
|
|
||
|
services:
|
||
|
app:
|
||
|
build:
|
||
|
context: .
|
||
|
dockerfile: Dockerfile
|
||
|
image: xrazis/nodejs-project
|
||
|
volumes:
|
||
|
- /usr/src/app/
|
||
|
restart: unless-stopped
|
||
|
ports:
|
||
|
- "3000:3000"
|
||
|
networks:
|
||
|
- node-network
|
||
|
deploy:
|
||
|
mode: replicated
|
||
|
replicas: 9
|
||
|
placement:
|
||
|
constraints:
|
||
|
- node.role==worker
|
||
|
resources:
|
||
|
limits:
|
||
|
cpus: "0.50"
|
||
|
memory: 50M
|
||
|
reservations:
|
||
|
cpus: "0.25"
|
||
|
memory: 20M
|
||
|
restart_policy:
|
||
|
condition: on-failure
|
||
|
delay: 5s
|
||
|
max_attempts: 3
|
||
|
window: 120s
|
||
|
|
||
|
networks:
|
||
|
node-network:
|
||
|
driver: overlay
|
||
|
volumes:
|
||
|
node-vol:
|