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 "python manage.py makemigrations && 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 ports: - 8000:8000 db: restart: always image: postgres volumes: - postgres_data:/var/lib/postgresql/data/ env_file: - ./.env.prod.db 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 # 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: