zapishis-client/docker-compose.yml

59 lines
1.1 KiB
YAML

services:
web:
image: ${DOCKERHUB_USERNAME}/zapishis-web:${WEB_IMAGE_TAG}
env_file:
- .env
restart: always
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/health']
interval: 10s
timeout: 3s
retries: 5
networks:
- app
- web
bot:
image: ${DOCKERHUB_USERNAME}/zapishis-bot:${BOT_IMAGE_TAG}
restart: always
env_file:
- .env
depends_on:
- redis
networks:
- app
redis:
image: redis:8-alpine
restart: always
env_file:
- .env
command: ['redis-server', '--requirepass', '${REDIS_PASSWORD}']
volumes:
- redis-data:/data
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- app
volumes:
redis-data:
networks:
app:
external: true
web:
external: true