version: "3.7" services: postgres: env_file: - .env image: postgres:12.2-alpine volumes: - ./postgres:/docker-entrypoint-initdb.d rabbitmq: image: rabbitmq:3.8.3-alpine redis: image: redis:5.0.8-alpine web: build: . command: data_subscriptions run --host=0.0.0.0 --port=5500 depends_on: - postgres env_file: - ./.env environment: - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_USER} - TEST_DATABASE_URL=postgresql://test:test@postgres:5432/test ports: - "5500:5500" volumes: - ./data_subscriptions:/code/data_subscriptions - ./migrations:/code/migrations - ./tests:/code/tests worker: build: . command: celery -A data_subscriptions.worker.tasks worker -B --loglevel=INFO --schedule=/tmp/celerybeat-schedule depends_on: - postgres - redis - rabbitmq env_file: - ./.env environment: - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_USER} volumes: - ./data_subscriptions:/code/data_subscriptions