fix quizroom docker checks

This commit is contained in:
Gabriel Matte 2024-12-07 16:40:53 -05:00
parent 32a41d93aa
commit dabdfafd35
2 changed files with 9 additions and 6 deletions

View file

@ -1,9 +1,8 @@
# Use the Node base image # Use the Node base image
FROM node:18 AS quizroom FROM node:18 AS quizroom
ARG PORT=4500 ENV PORT=4500
ENV PORT=${PORT} ENV ROOM_ID=000000
ENV ROOM_ID=${ROOM_ID}
# Create a working directory # Create a working directory
WORKDIR /usr/src/app WORKDIR /usr/src/app
@ -15,6 +14,10 @@ RUN npm install
# Copy the rest of the source code to the container # Copy the rest of the source code to the container
COPY . . 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 # Build the TypeScript code
RUN npm run build RUN npm run build

View file

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/bash
curl -f "http://0.0.0.0:${PORT}/health" || exit 1 curl -f "http://0.0.0.0:${PORT}/health" || exit 1