Не могу получить доступ к сайту без :8000

Есть docker-compose

version: "3.8"

services:
  redis:
    container_name: redis_freelance
    build: ./redis
    restart: always
    networks:
      - freelance_network

  django:
    build:
      context: ./senderdjango
      dockerfile: Dockerfile
    volumes:
      - ./senderdjango:/usr/src/app
      - ./senderdjango/db.sqlite3:/usr/src/app/db.sqlite3
      - static_volume:/usr/src/app/staticfiles
      - ./certbot/www:/var/www/certbot/:ro
      - ./certbot/conf/:/etc/nginx/ssl/:ro

    ports:
      - "8000:80"
    restart: always
    networks:
      - freelance_network
    depends_on:
      - redis
      - bot
    env_file:
      - Bot/.env



  bot:
    build:
      context: ./Bot
      dockerfile: Dockerfile
    networks:
      - freelance_network
    depends_on:
      - redis
    restart: always

  certbot:
    image: certbot/certbot:latest
    networks:
      - freelance_network

    volumes:
      - ./certbot/www/:/var/www/certbot/:rw
      - ./certbot/conf/:/etc/letsencrypt/:rw


networks:
  freelance_network:
    driver: bridge

volumes:
  static_volume:

Docker

version: "3.8"

services:
  redis:
    container_name: redis_freelance
    build: ./redis
    restart: always
    networks:
      - freelance_network

  django:
    build:
      context: ./senderdjango
      dockerfile: Dockerfile
    volumes:
      - ./senderdjango:/usr/src/app
      - ./senderdjango/db.sqlite3:/usr/src/app/db.sqlite3
      - static_volume:/usr/src/app/staticfiles
      - ./certbot/www:/var/www/certbot/:ro
      - ./certbot/conf/:/etc/nginx/ssl/:ro

    ports:
      - "8000:80"
    restart: always
    networks:
      - freelance_network
    depends_on:
      - redis
      - bot
    env_file:
      - Bot/.env



  bot:
    build:
      context: ./Bot
      dockerfile: Dockerfile
    networks:
      - freelance_network
    depends_on:
      - redis
    restart: always

  certbot:
    image: certbot/certbot:latest
    networks:
      - freelance_network

    volumes:
      - ./certbot/www/:/var/www/certbot/:rw
      - ./certbot/conf/:/etc/letsencrypt/:rw


networks:
  freelance_network:
    driver: bridge

volumes:
  static_volume:

nginx.conf

user  nginx;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen 80;
        server_name example.ru;

        location /static/ {
            alias /usr/src/app/staticfiles/; # Путь к вашей статической папке
        }

        location / {
            proxy_pass http://localhost:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
}

на сайт могу достучаться только example.ru:8000 что нужно переделать чтобы был доступен не только через порт 8000 но и по example.ru?

Вернуться на верх