mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
fix quizroom docker checks
This commit is contained in:
parent
32a41d93aa
commit
dabdfafd35
2 changed files with 9 additions and 6 deletions
|
|
@ -1,9 +1,8 @@
|
|||
# Use the Node base image
|
||||
# Use the Node base image
|
||||
FROM node:18 AS quizroom
|
||||
|
||||
ARG PORT=4500
|
||||
ENV PORT=${PORT}
|
||||
ENV ROOM_ID=${ROOM_ID}
|
||||
ENV PORT=4500
|
||||
ENV ROOM_ID=000000
|
||||
|
||||
# Create a working directory
|
||||
WORKDIR /usr/src/app
|
||||
|
|
@ -15,6 +14,10 @@ RUN npm install
|
|||
# Copy the rest of the source code to the container
|
||||
COPY . .
|
||||
|
||||
# Ensure healthcheck.sh has execution permissions
|
||||
COPY healthcheck.sh /usr/src/app/healthcheck.sh
|
||||
RUN chmod +x /usr/src/app/healthcheck.sh
|
||||
|
||||
# Build the TypeScript code
|
||||
RUN npm run build
|
||||
|
||||
|
|
@ -26,4 +29,4 @@ HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 \
|
|||
CMD /usr/src/app/healthcheck.sh
|
||||
|
||||
# Start the server using the compiled JavaScript file
|
||||
CMD ["node", "dist/app.js"]
|
||||
CMD ["node", "dist/app.js"]
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
curl -f "http://0.0.0.0:${PORT}/health" || exit 1
|
||||
Loading…
Reference in a new issue