update Docker and Nginx configuration to support Certbot for SSL certificate management
This commit is contained in:
0
certbot/conf/.gitkeep
Normal file
0
certbot/conf/.gitkeep
Normal file
0
certbot/www/.gitkeep
Normal file
0
certbot/www/.gitkeep
Normal file
@ -15,7 +15,10 @@ upstream frontend
|
|||||||
|
|
||||||
server
|
server
|
||||||
{
|
{
|
||||||
listen 80; server_name crm.logidex.ru;
|
listen 80;
|
||||||
|
|
||||||
|
server_tokens off;
|
||||||
|
server_name crm.logidex.ru www.crm.logidex.ru;
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_proxied any;
|
gzip_proxied any;
|
||||||
gzip_comp_level 4;
|
gzip_comp_level 4;
|
||||||
@ -64,4 +67,8 @@ server
|
|||||||
proxy_cache_valid 60m;
|
proxy_cache_valid 60m;
|
||||||
proxy_pass http://frontend;
|
proxy_pass http://frontend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/certbot;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -17,7 +17,7 @@ services:
|
|||||||
- appnet
|
- appnet
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:latest
|
image: nginx:alpine-slim
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
@ -33,9 +33,24 @@ services:
|
|||||||
source: app_run
|
source: app_run
|
||||||
target: /app/run
|
target: /app/run
|
||||||
read_only: false
|
read_only: false
|
||||||
|
- type: bind
|
||||||
|
source: ./certbot/www
|
||||||
|
target: /var/www/certbot
|
||||||
|
read_only: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- appnet
|
- appnet
|
||||||
|
certbot:
|
||||||
|
image: certbot/certbot:latest
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ./certbot/www
|
||||||
|
target: /var/www/certbot
|
||||||
|
read_only: false
|
||||||
|
- type: bind
|
||||||
|
source: ./certbot/conf
|
||||||
|
target: /etc/letsencrypt
|
||||||
|
read_only: false
|
||||||
volumes:
|
volumes:
|
||||||
app_run:
|
app_run:
|
||||||
driver: local
|
driver: local
|
||||||
|
|||||||
Reference in New Issue
Block a user