diff --git a/.env b/.env index 7608858..8197548 100644 --- a/.env +++ b/.env @@ -25,3 +25,6 @@ HTTPS_OUTER_PORT=443 # NGINX EMAIL=valitovgaziz@yandex.ru DOMAINS=yalarba.ru,www.yalarba.ru + +# CERTBOT +CERTBOT_PORT=333 diff --git a/docker-compose.yaml b/docker-compose.yaml index 8f92fdd..b796190 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -76,6 +76,7 @@ services: volumes: - ./nginx/configs:/etc/nginx/conf.d - certbot-etc:/etc/letsencrypt + - ./spa/app:/var/www/yalarba.ru/html networks: - web-network depends_on: @@ -87,7 +88,7 @@ services: volumes: - certbot-etc:/etc/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 restart: unless-stopped diff --git a/nginx/Dockerfile b/nginx/Dockerfile index f89f578..e3fb97c 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,5 +1,3 @@ FROM nginx:latest RUN mkdir -p /var/www/yalarba.ru/html - -COPY spa_app/index.html /var/www/yalarba.ru/html diff --git a/nginx/configs/nginx.conf b/nginx/configs/nginx.conf index 0af598a..5280e9b 100644 --- a/nginx/configs/nginx.conf +++ b/nginx/configs/nginx.conf @@ -55,3 +55,11 @@ server { # 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; + } +} diff --git a/spa/index.html b/spa/app/index.html similarity index 100% rename from spa/index.html rename to spa/app/index.html