Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new checks to fix enhance deployment #156

Merged
merged 2 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ RUN mkdir -p /app
WORKDIR /app
COPY --from=0 /app/jojo-discord-bot jojo-discord-bot
COPY ./scripts/entrypoint.sh /usr/bin/entrypoint.sh
COPY ./app.json /app/app.json
RUN chmod 755 jojo-discord-bot
RUN chmod 755 /usr/bin/entrypoint.sh

RUN echo "/v1/stats/ {" > CHECKS \
&& echo "/swagger <!DOCTYPE html>" >> CHECKS

VOLUME ["/app/data", "/app/log"]


Expand Down
22 changes: 22 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"healthchecks": {
"web": [
{
"type": "startup",
"name": "check swagger",
"description": "Checking if the app responds to the /swagger endpoint",
"path": "/swagger",
"content": "<!DOCTYPE html>",
"attempts": 3
},
{
"type": "startup",
"name": "check stats",
"description": "Checking if the app responds to the /v1/stats endpoint",
"path": "/v1/stats/",
"content": "{",
"attempts": 3
}
]
}
}
Loading