Revize 4cd05f77
Přidáno uživatelem Tomáš Ballák před téměř 5 roky(ů)
docker-compose-prod.yml | ||
---|---|---|
7 | 7 |
ports: |
8 | 8 |
- "443:443" |
9 | 9 |
volumes: |
10 |
- /etc/letsencrypt:/root/.acme.sh/heatmap.zcu.cz
|
|
11 |
- ./docker/nginx/sites:/etc/nginx/sites-available |
|
10 |
- /etc/certificate:/certificate
|
|
11 |
- ./docker/nginx/sites-dev:/etc/nginx/sites-available
|
|
12 | 12 |
- /acme-challenge:/var/www/symfony/public/.well-known/acme-challenge/ |
docker/nginx/sites/default.conf | ||
---|---|---|
4 | 4 |
listen [::]:80 default_server ipv6only=on; |
5 | 5 |
|
6 | 6 |
server_name heatmap.zcu.cz www.heatmap.zcu.cz; |
7 |
ssl_certificate /root/.acme.sh/heatmap.zcu.cz/heatmap.zcu.cz.cer;
|
|
8 |
ssl_certificate_key /root/.acme.sh/heatmap.zcu.cz/heatmap.zcu.cz.key;
|
|
7 |
ssl_certificate /certificate/key.pem;
|
|
8 |
ssl_certificate_key /certificate/cert.pem;
|
|
9 | 9 |
|
10 | 10 |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
11 | 11 |
ssl_prefer_server_ciphers on; |
scripts/renew_certificate.sh | ||
---|---|---|
5 | 5 |
|
6 | 6 |
if [ "$1" = "new" ]; then |
7 | 7 |
docker-compose exec nginx /bin/sh -c " |
8 |
cd /root/.acme.sh/heatmap.zcu.cz/ \ |
|
9 |
openssl dhparam -dsaparam -out dhparams.pem 4096; \ |
|
10 |
bash /root/.acme.sh/acme.sh --issue -w /var/www/symfony/public -d heatmap.zcu.cz -k 4096 --debug 2; \ |
|
11 |
bash /root/.acme.sh/acme.sh --installcert -d heatmap.zcu.cz \ |
|
12 |
--key-file /root/.acme.sh/heatmap.zcu.cz/heatmap.zcu.cz.key \ |
|
13 |
--fullchain-file /root/.acme.sh/heatmap.zcu.cz/fullchain.cer \ |
|
8 |
cd /root/.acme.sh; \ |
|
9 |
bash acme.sh --issue -d www.heatmap.zcu.cz --nginx /etc/nginx/sites-available/default.conf --debug 2; \ |
|
10 |
bash acme.sh --installcert -d heatmap.zcu.cz \ |
|
11 |
--key-file /certificate/key.pem \ |
|
12 |
--fullchain-file /certificate/cert.pem \ |
|
14 | 13 |
--reloadcmd 'bash /etc/init.d/nginx reload'; |
15 | 14 |
"; |
16 | 15 |
else |
Také k dispozici: Unified diff
hotifx