-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openchallenges): replace Nginx by Caddy project (ARCH-354) (#2934)
- Loading branch information
1 parent
fab0893
commit d1608b8
Showing
8 changed files
with
41 additions
and
156 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
debug | ||
} | ||
|
||
:80 { | ||
handle_path /api-docs* { | ||
reverse_proxy {env.API_DOCS_HOST}:{env.API_DOCS_PORT} | ||
} | ||
|
||
handle_path /api* { | ||
reverse_proxy {env.API_GATEWAY_HOST}:{env.API_GATEWAY_PORT} | ||
} | ||
|
||
handle_path /health { | ||
respond `{"status":"healthy"}` 200 | ||
header Content-Type application/json | ||
} | ||
|
||
handle_path /img* { | ||
reverse_proxy {env.THUMBOR_HOST}:{env.THUMBOR_PORT} | ||
} | ||
|
||
handle_path /zipkin* { | ||
rewrite * /zipkin{uri} | ||
reverse_proxy {env.ZIPKIN_HOST}:{env.ZIPKIN_PORT} | ||
} | ||
|
||
handle { | ||
reverse_proxy {env.APP_HOST}:{env.APP_PORT} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
FROM nginx:1.25.1-alpine | ||
FROM caddy:2.8.4 | ||
|
||
RUN apk add --no-cache jq | ||
RUN apk add --no-cache curl jq | ||
|
||
HEALTHCHECK --interval=2s --timeout=3s --retries=20 --start-period=5s \ | ||
CMD curl --fail --silent "localhost:8000/health" | jq '.status' | grep UP || exit 1 | ||
CMD curl --fail --silent "localhost:80/health" | jq '.status' | grep healthy || exit 1 | ||
|
||
COPY templates /etc/nginx/templates/ | ||
COPY nginx.conf /etc/nginx/ | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
COPY Caddyfile /etc/caddy/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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