Files
random-lol/compose.prod.yml
2025-11-08 03:08:25 +01:00

50 lines
1.3 KiB
YAML

services:
random-lol:
build:
context: .
dockerfile: Dockerfile
image: random-lol:latest
container_name: random-lol-prod
restart: always
ports:
- '80:4000'
environment:
- NODE_ENV=production
- PORT=4000
healthcheck:
test:
[
'CMD',
'node',
'-e',
"require('http').get('http://localhost:4000', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
networks:
- random-lol-network
networks:
random-lol-network:
driver: bridge