add alternative port for certbot, change path for spa__app int docker-compose.yml, change Dockerfile

This commit is contained in:
2025-05-27 19:37:12 +03:00
parent 3b60cd6317
commit b1c72b01a4
5 changed files with 13 additions and 3 deletions
+3
View File
@@ -25,3 +25,6 @@ HTTPS_OUTER_PORT=443
# NGINX # NGINX
EMAIL=valitovgaziz@yandex.ru EMAIL=valitovgaziz@yandex.ru
DOMAINS=yalarba.ru,www.yalarba.ru DOMAINS=yalarba.ru,www.yalarba.ru
# CERTBOT
CERTBOT_PORT=333
+2 -1
View File
@@ -76,6 +76,7 @@ services:
volumes: volumes:
- ./nginx/configs:/etc/nginx/conf.d - ./nginx/configs:/etc/nginx/conf.d
- certbot-etc:/etc/letsencrypt - certbot-etc:/etc/letsencrypt
- ./spa/app:/var/www/yalarba.ru/html
networks: networks:
- web-network - web-network
depends_on: depends_on:
@@ -87,7 +88,7 @@ services:
volumes: volumes:
- certbot-etc:/etc/letsencrypt - certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt - certbot-var:/var/lib/letsencrypt
command: sh -c "certbot certonly --standalone --noninteractive --agree-tos --email ${EMAIL} -d ${DOMAINS} --keep-until-expiring" command: sh -c "certbot certonly --standalone -p ${CERBOT_PORT} --noninteractive --agree-tos --email ${EMAIL} -d ${DOMAINS} --keep-until-expiring"
env_file: env_file:
- .env - .env
restart: unless-stopped restart: unless-stopped
-2
View File
@@ -1,5 +1,3 @@
FROM nginx:latest FROM nginx:latest
RUN mkdir -p /var/www/yalarba.ru/html RUN mkdir -p /var/www/yalarba.ru/html
COPY spa_app/index.html /var/www/yalarba.ru/html
+8
View File
@@ -55,3 +55,11 @@ server {
# fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
# } # }
} }
# HTTP for certbot ssl certificate alterante port
server {
listen ${CERTBOT_PORT}; # альтернативный порт для Certbot
location ~ /.well-known {
allow all;
}
}