version: "3.9" services: postgres: restart: always image: postgres:12 container_name: postgres healthcheck: test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ] interval: 10s timeout: 60s retries: 3 start_period: 10s volumes: - /postgres:/var/lib/postgresql/data env_file: - .env ports: - '5432:5432' redis: container_name: redis image: redis restart: always volumes: - ./redis:/data ports: - "6379:6379" healthcheck: test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] interval: 1s timeout: 3s retries: 5 # celery: # build: . # command: celery -A tasks worker --loglevel=info # volumes: # - .:/code # depends_on: # redis: # condition: service_healthy # environment: # - CELERY_BROKER_URL=redis://redis:6379/0 # - CELERY_RESULT_BACKEND=redis://redis:6379/0 # # flower: # image: mher/flower # ports: # - "5555:5555" # depends_on: # celery: # condition: service_started # environment: # - CELERY_BROKER_URL=redis://redis:6379/0 # healthcheck: # test: [ "CMD", "curl", "-f", "http://localhost:5555/" ] # interval: 30s # timeout: 10s # retries: 5 # project: # build: # dockerfile: Dockerfile # context: . # image: repcofkk:latest # container_name: repcofkk # depends_on: # - postgres # volumes: # - static_volume:/cybercode/static # - media_volume:/cybercode/media # env_file: # - ../env # #command: > # # bash -c "python ./manage.py collectstatic --noinput && python ./manage.py migrate && gunicorn -b 0.0.0.0:8000 repcofkk.wsgi:application" # nginx: # build: # dockerfile: ./Dockerfile # context: ./docker/nginx/ # container_name: nginx # image: nginx # volumes: # - static_volume:/cybercode/static # - media_volume:/cybercode/media # depends_on: # - project # ports: # - 80:80 volumes: static_volume: media_volume: