update nginx config at every startup (to account for hotswap of keys)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon Bruder 2019-07-15 15:24:34 +00:00
parent c719c1bb4b
commit 0f7f6cbb6f
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ RUN apk add --no-cache \
tor
COPY torrc /etc/tor/torrc
COPY nginx.conf /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf.tmpl
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -4,10 +4,9 @@ su-exec tor tor -f /etc/tor/torrc
tor_domain=$(cat /var/lib/tor/hidden-service/hostname)
main_domain=$(echo $MAIN_DOMAIN|sed 's/\./\\\./')
sed -i \
-e "s/@@TOR_DOMAIN@@/$tor_domain/g" \
sed -e "s/@@TOR_DOMAIN@@/$tor_domain/g" \
-e "s/@@MAIN_DOMAIN@@/$main_domain/g" \
/etc/nginx/nginx.conf
/etc/nginx/nginx.conf.tmpl > /etc/nginx/nginx.conf
echo $tor_domain