version: '3.8' services: web: build: context: ./app dockerfile: Dockerfile.prod # command: gunicorn core.wsgi:application --bind 0.0.0.0:8000 command: bash -c "chmod +x /usr/src/app/entrypoint.sh && /usr/src/app/entrypoint.sh && python manage.py migrate && python manage.py runserver 0.0.0.0:8000" volumes: - static_volume:/usr/src/app/staticfiles - media_volume:/usr/src/app/media expose: - 8000 env_file: - ./.env.prod depends_on: db: condition: service_healthy ports: - 8000:8000 restart: on-failure db: restart: always image: postgres:13-alpine volumes: - postgres_data:/var/lib/postgresql env_file: - ./.env.prod.db healthcheck: test: ["CMD-SHELL", "pg_isready -U hello_django -d hello_django_prod"] interval: 10s timeout: 5s retries: 5 nginx: build: ./nginx volumes: - static_volume:/usr/src/app/staticfiles - media_volume:/usr/src/app/media # - ./certbot/www:/var/www/certbot/:ro # - ./certbot/conf/:/etc/nginx/ssl/:ro ports: - 80:80 - 443:443 depends_on: - web restart: always adminer: image: adminer restart: always ports: - 8080:8080 # certbot: # image: certbot/certbot:latest # volumes: # - ./certbot/conf:/etc/letsencrypt # - ./certbot/www:/var/www/certbot # command: certonly --webroot -w /var/www/certbot --force-renewal --email autocratickamal1@gmail.com -d mouthlipsync.com --agree-tos volumes: postgres_data: static_volume: media_volume: