Skip to content

Commit 3afe752

Browse files
braccaeawinterstein
authored andcommitted
set backend server location with env
1 parent 92dc871 commit 3afe752

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ FROM caddy AS client
9191

9292
COPY --from=build /usr/src/habitica/website/client/dist /var/www
9393

94+
ENV BACKEND_SERVER=server:3000
95+
9496
RUN echo -e ":80 {\n\
9597
@backend not {\n\
9698
path /static/audio/\n\
@@ -106,6 +108,6 @@ RUN echo -e ":80 {\n\
106108
}\n\
107109
\n\
108110
root * /var/www\n\
109-
reverse_proxy @backend server:3000\n\
111+
reverse_proxy @backend {\$BACKEND_SERVER:server:3000}\n\
110112
file_server\n\
111113
}" > /etc/caddy/Caddyfile

0 commit comments

Comments
 (0)