networks:
dokploy-network:
external: true
volumes:
token:
driver: local
services:
app:
image : ghcr.io/imagename:latest
ports:
- 3001
environment:
NODE_ENV: "production"
PORT: 3001
restart: always # Ensure the app automatically restarts if it crashes
deploy:
replicas: 3
resources:
limits:
cpus: "1.0" # Limit to 1 CPU core
memory: "512M" # Limit memory usage to 512MB
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001"]
interval: 30s
timeout: 10s
retries: 3
volumes:
- token:/app/token
networks:
- dokploy-network
command: ["bun", "run", "start"]
networks:
dokploy-network:
external: true
volumes:
token:
driver: local
services:
app:
image : ghcr.io/imagename:latest
ports:
- 3001
environment:
NODE_ENV: "production"
PORT: 3001
restart: always # Ensure the app automatically restarts if it crashes
deploy:
replicas: 3
resources:
limits:
cpus: "1.0" # Limit to 1 CPU core
memory: "512M" # Limit memory usage to 512MB
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001"]
interval: 30s
timeout: 10s
retries: 3
volumes:
- token:/app/token
networks:
- dokploy-network
command: ["bun", "run", "start"]