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' # 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: