Última atividade 2 days ago

curiouser's Avatar Winston Hoy revisou este gist 11 months ago. Ir para a revisão

1 file changed, 6 insertions, 4 deletions

docker-compose.yml

@@ -5,7 +5,7 @@ services:
5 5 env_file: snikket.conf
6 6 network_mode: host
7 7 volumes:
8 - - ./data:/snikket
8 + - snikket_data:/snikket
9 9 restart: "unless-stopped"
10 10 snikket_portal:
11 11 container_name: snikket-portal
@@ -13,15 +13,17 @@ services:
13 13 network_mode: host
14 14 env_file: snikket.conf
15 15 restart: "unless-stopped"
16 -
17 16 snikket_server:
18 17 container_name: snikket
19 18 image: snikket/snikket-server:stable
20 19 network_mode: host
21 20 volumes:
22 - - ./data:/snikket
21 + - snikket_data:/snikket
23 22 - /some/abs/path/etc/prosody/certs/domain.tld.key:/etc/prosody/certs/domain.tld.key
24 23 - /some/abs/path/etc/prosody/certs/domain.tld.crt:/etc/prosody/certs/domain.tld.crt
25 24 - /some/abs/path/etc/sv/prosody/wait-for-certs:/etc/sv/prosody/wait-for-certs
26 25 env_file: snikket.conf
27 - restart: "unless-stopped"
26 + restart: "unless-stopped"
27 +
28 + volumes:
29 + snikket_data:

curiouser's Avatar Winston Hoy revisou este gist 11 months ago. Ir para a revisão

1 file changed, 3 insertions, 3 deletions

docker-compose.yml

@@ -20,8 +20,8 @@ services:
20 20 network_mode: host
21 21 volumes:
22 22 - ./data:/snikket
23 - - /srv/snikket/etc/prosody/certs/domain.tld.key:/etc/prosody/certs/domain.tld.key
24 - - /srv/snikket/etc/prosody/certs/domain.tld.crt:/etc/prosody/certs/domain.tld.crt
25 - - /srv/snikket/etc/sv/prosody/wait-for-certs:/etc/sv/prosody/wait-for-certs
23 + - /some/abs/path/etc/prosody/certs/domain.tld.key:/etc/prosody/certs/domain.tld.key
24 + - /some/abs/path/etc/prosody/certs/domain.tld.crt:/etc/prosody/certs/domain.tld.crt
25 + - /some/abs/path/etc/sv/prosody/wait-for-certs:/etc/sv/prosody/wait-for-certs
26 26 env_file: snikket.conf
27 27 restart: "unless-stopped"

curiouser's Avatar Winston Hoy revisou este gist 11 months ago. Ir para a revisão

2 files changed, 52 insertions

docker-compose.yml(arquivo criado)

@@ -0,0 +1,27 @@
1 + services:
2 + snikket_proxy:
3 + container_name: snikket-proxy
4 + image: snikket/snikket-web-proxy:stable
5 + env_file: snikket.conf
6 + network_mode: host
7 + volumes:
8 + - ./data:/snikket
9 + restart: "unless-stopped"
10 + snikket_portal:
11 + container_name: snikket-portal
12 + image: snikket/snikket-web-portal:stable
13 + network_mode: host
14 + env_file: snikket.conf
15 + restart: "unless-stopped"
16 +
17 + snikket_server:
18 + container_name: snikket
19 + image: snikket/snikket-server:stable
20 + network_mode: host
21 + volumes:
22 + - ./data:/snikket
23 + - /srv/snikket/etc/prosody/certs/domain.tld.key:/etc/prosody/certs/domain.tld.key
24 + - /srv/snikket/etc/prosody/certs/domain.tld.crt:/etc/prosody/certs/domain.tld.crt
25 + - /srv/snikket/etc/sv/prosody/wait-for-certs:/etc/sv/prosody/wait-for-certs
26 + env_file: snikket.conf
27 + restart: "unless-stopped"

wait-for-certs(arquivo criado)

@@ -0,0 +1,25 @@
1 + #!/bin/sh -e
2 +
3 + CERT_PATH_LE_LIVE="/snikket/letsencrypt/live/$SNIKKET_DOMAIN_ASCII"
4 + CERT_PATH="/etc/prosody/certs/$SNIKKET_DOMAIN.crt"
5 +
6 + check_cert_path() {
7 + if test -f "$CERT_PATH"; then
8 + exit 0;
9 + fi
10 + }
11 +
12 + check_cert_path_le_live() {
13 + if test -d "$CERT_PATH_LE_LIVE"; then
14 + prosodyctl --root cert import /snikket/letsencrypt/live
15 + check_cert_path
16 + fi
17 + }
18 +
19 + check_cert_path()
20 +
21 + check_cert_path_le_live()
22 +
23 + while sleep 10; do
24 + check_cert_path_le_live()
25 + done
Próximo Anterior