zapishis-client/docker-compose.yml
vchikalkin 50ef49d01f Add cache-proxy service to Docker configurations and update deployment workflow</message>
<message>
- Introduced a new cache-proxy service in both `docker-compose.dev.yml` and `docker-compose.yml`, with dependencies on Redis and integration into the web and bot services.
- Updated GitHub Actions workflow to include build and push steps for the cache-proxy image, ensuring it is deployed alongside web and bot services.
- Modified environment variable management to accommodate the cache-proxy, enhancing the overall deployment process.
- Adjusted GraphQL cached URL to point to the cache-proxy service for improved request handling.
2025-10-06 20:10:30 +03:00

72 lines
1.3 KiB
YAML

services:
cache-proxy:
image: ${DOCKERHUB_USERNAME}/zapishis-cache-proxy:${CACHE_PROXY_IMAGE_TAG}
env_file:
- .env
restart: always
depends_on:
- redis
networks:
- app
- web
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
depends_on:
- cache-proxy
networks:
- app
- web
bot:
image: ${DOCKERHUB_USERNAME}/zapishis-bot:${BOT_IMAGE_TAG}
restart: always
env_file:
- .env
depends_on:
- redis
- cache-proxy
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