update nginx config at every startup (to account for hotswap of keys)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c719c1bb4b
commit
0f7f6cbb6f
|
@ -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"]
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Reference in a new issue