Skip to content

Commit

Permalink
feat(docker): separate installation & working directories
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Jan 11, 2024
1 parent 916f3fe commit c4d96e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Expand Up @@ -15,17 +15,18 @@ COPY --link . .

FROM node:18-alpine AS runner
RUN apk --no-cache add curl \
&& adduser --disabled-password --home /home/container container
&& adduser --disabled-password --home /home/container container \
&& mkdir /app
USER container
ENV USER=container \
HOME=/home/container \
NODE_ENV=production \
HTTP_HOST=0.0.0.0 \
HTTP_PORT=80
WORKDIR /home/container
COPY --from=builder --chown=container:container /build ./
COPY --from=builder --chown=container:container /build /app
EXPOSE ${HTTP_PORT}/tcp
ENTRYPOINT [ "/home/container/scripts/start.sh" ]
ENTRYPOINT [ "/app/scripts/start.sh" ]
HEALTHCHECK --interval=15s --timeout=5s --start-period=60s \
CMD curl -f http://localhost:${HTTP_PORT}/status || exit 1
LABEL org.opencontainers.image.source=https://github.com/discord-tickets/bot \
Expand Down

0 comments on commit c4d96e8

Please sign in to comment.