Fix start if dir already exists.
This commit is contained in:
parent
92ed8ce54a
commit
af9cc470fb
2 changed files with 1 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
LABEL homepage=https://git.redxef.duckdns.org/
|
|
||||||
|
|
||||||
RUN apk update && apk upgrade && apk add nginx gettext && \
|
RUN apk update && apk upgrade && apk add nginx gettext && \
|
||||||
rm -r /etc/nginx
|
rm -r /etc/nginx
|
||||||
|
|
|
@ -25,7 +25,7 @@ sub_env_vars="$(cat /environment_variables.txt)"
|
||||||
echo "Enabling servers"
|
echo "Enabling servers"
|
||||||
(
|
(
|
||||||
cd "/etc/nginx/sites-available" || exit $?
|
cd "/etc/nginx/sites-available" || exit $?
|
||||||
mkdir "../sites-enabled" || exit $?
|
test -d "../sites-enabled" || mkdir "../sites-enabled"
|
||||||
for f in *.conf; do
|
for f in *.conf; do
|
||||||
envsubst "$sub_env_vars" < "$f" > "../sites-enabled/$f"
|
envsubst "$sub_env_vars" < "$f" > "../sites-enabled/$f"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue