FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/
server {
listen 95;
server_name my_domain.ru www.my_domain;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
return 301 https://$host:96$request_uri;
}
server {
listen 96 ssl;
server_name my_domain.ru www.my_domain;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
ssl on;
ssl_certificate fullchain.pem;
ssl_certificate_key privkey.pem;
location / {
include uwsgi_params;
uwsgi_pass app:8095;
}
}
nginx:
volumes:
- ./file_setting/fullchain.pem:/etc/nginx/fullchain.pem
- ./file_setting/privkey.pem:/etc/nginx/privkey.pem
build: ./nginx
container_name: t_nginx
restart: always
ports:
- 95:80
depends_on:
- app
Устанавливаем пакеты RUN pip3 install -r requirements.txt
Сервис app:
Получается надо app Тогда поднимать на 443?
Что-то я запутался...