services: twitter_backend: container_name: twitter_backend image: rmcampos/twitter-backend:latest build: context: ./backend dockerfile: Dockerfile ports: - "8080:8080" environment: - APP_CONSUMER_KEY=${APP_CONSUMER_KEY} - APP_CONSUMER_KEY_SECRET=${APP_CONSUMER_KEY_SECRET} - APP_ACCESS_TOKEN=${APP_ACCESS_TOKEN} - APP_ACCESS_TOKEN_SECRET=${APP_ACCESS_TOKEN_SECRET} - APP_PASSWORD=${APP_PASSWORD} - APP_SECRET=${APP_SECRET} - REDIS_URL=redis://twitter_redis:6379 - CORS_ALLOWED_ORIGIN=http://localhost:5173 - NOTIFICATION_DB_PATH=/data/notifications.db depends_on: twitter_redis: condition: service_healthy twitter_sqlite: condition: service_started restart: unless-stopped volumes: - notifications-data:/data networks: - twitter-network twitter_sqlite: container_name: twitter_sqlite hostname: twitter_sqlite image: alpine:3.20 command: ["sh", "-c", "mkdir -p /data && tail -f /dev/null"] volumes: - notifications-data:/data networks: - twitter-network twitter_redis: container_name: twitter_redis hostname: twitter_redis image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 volumes: - redis-data:/data restart: unless-stopped networks: - twitter-network twitter_frontend: container_name: twitter_frontend build: context: ./frontend dockerfile: Dockerfile args: VITE_API_URL: http://localhost:8080 ports: - "5173:5173" depends_on: - twitter_backend networks: - twitter-network volumes: redis-data: notifications-data: networks: twitter-network: external: true