Created
April 15, 2020 17:12
-
-
Save stephenhillier/e22c265ba5c4ccd780d9179aac41dc0c to your computer and use it in GitHub Desktop.
Caddy 2 config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:8080 | |
root * /app/src | |
encode gzip | |
route { | |
reverse_proxy /api/* {$WALLY_BACKEND_SERVICE}:8000 | |
reverse_proxy /docs {$WALLY_BACKEND_SERVICE}:8000 | |
file_server | |
try_files {path} /index.html | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10 as build | |
WORKDIR /app | |
COPY package*.json /app/ | |
RUN npm ci | |
COPY . . | |
RUN npm run build | |
FROM caddy:2.0.0-beta.17 | |
WORKDIR /app/src | |
COPY --from=build /app/dist/ /app/src | |
COPY --from=build /app/Caddyfile /etc/caddy/Caddyfile | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment