services: link-shortener: image: ${IMAGE} container_name: link-shortener-app networks: - isolated - proxy depends_on: redis: condition: service_healthy 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} restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:8080/ping"] interval: 5s timeout: 2s retries: 10 start_period: 10s redis: image: redis:latest container_name: link-shortener-redis networks: [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: isolated: driver: bridge proxy: external: true