Files
link-shortener/docker-compose.yml
root 4b8d776bd5
All checks were successful
continuous-integration/drone/push Build is passing
revert c0f3a80742
revert shortified link port fix
2026-02-21 16:39:42 +00:00

50 lines
1.1 KiB
YAML

services:
link-shortener:
image: ${IMAGE}
container_name: link-shortener-app
networks:
- link-shortener_isolated
depends_on:
redis:
condition: service_healthy
ports:
- "8080:8080"
expose:
- 8080
environment:
- SERVER_HOST=${SERVER_HOST}
- VIRTUAL_HOST=${VIRTUAL_HOST}
- VIRTUAL_PORT=${VIRTUAL_PORT}
- LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
- SERVER_PORT=${SERVER_PORT}
- REDIS_URL=${REDIS_URL}
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/ping"]
interval: 5s
timeout: 2s
retries: 20
start_period: 10s
redis:
image: redis:latest
container_name: link-shortener-redis
networks: [link-shortener_isolated]
restart: unless-stopped
volumes:
- redis_data:/data
command: ["redis-server", "--appendonly", "yes"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
volumes:
redis_data:
driver: local
networks:
link-shortener_isolated:
driver: bridge