-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.ssl.yml
More file actions
45 lines (41 loc) · 1.31 KB
/
docker-compose.ssl.yml
File metadata and controls
45 lines (41 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Production SSL Docker Compose
# extends docker-compose.dev.yml with SSL configuration
version: '3.8'
services:
# SSL-enabled Nginx
nginx-ssl:
image: nginx:alpine
container_name: enterprise-nginx-ssl
restart: unless-stopped
ports:
- "80:80" # HTTP (redirects to HTTPS)
- "443:443" # HTTPS
volumes:
- ./nginx/ssl.conf:/etc/nginx/conf.d/default.conf:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
- /var/www/certbot:/var/www/certbot:ro
environment:
- NGINX_WORKER_PROCESSES=auto
- NGINX_WORKER_CONNECTIONS=1024
healthcheck:
test: ["CMD", "curl", "-k", "-f", "https://localhost/nginx/health"]
interval: 30s
timeout: 10s
retries: 3
external_links:
- enterprise-api-gateway-dev:api-gateway
- enterprise-frontend-next-dev:frontend
# Certbot for SSL certificate management
certbot:
image: certbot/certbot:latest
container_name: enterprise-certbot
volumes:
- /etc/letsencrypt:/etc/letsencrypt
- /var/www/certbot:/var/www/certbot
command: certonly --webroot --webroot-path=/var/www/certbot --email admin@cactoos.digital --agree-tos --no-eff-email -d cactoos.digital -d www.cactoos.digital
depends_on:
- nginx-ssl
networks:
default:
name: enterprise_enterprise-network
external: true