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

master
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 tor
COPY torrc /etc/tor/torrc 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 COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/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) tor_domain=$(cat /var/lib/tor/hidden-service/hostname)
main_domain=$(echo $MAIN_DOMAIN|sed 's/\./\\\./') main_domain=$(echo $MAIN_DOMAIN|sed 's/\./\\\./')
sed -i \ sed -e "s/@@TOR_DOMAIN@@/$tor_domain/g" \
-e "s/@@TOR_DOMAIN@@/$tor_domain/g" \
-e "s/@@MAIN_DOMAIN@@/$main_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 echo $tor_domain