mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 09:23:07 +02:00
feat(docker): separate installation & working directories
This commit is contained in:
parent
916f3fee78
commit
c4d96e8ee2
@ -15,7 +15,8 @@ COPY --link . .
|
|||||||
|
|
||||||
FROM node:18-alpine AS runner
|
FROM node:18-alpine AS runner
|
||||||
RUN apk --no-cache add curl \
|
RUN apk --no-cache add curl \
|
||||||
&& adduser --disabled-password --home /home/container container
|
&& adduser --disabled-password --home /home/container container \
|
||||||
|
&& mkdir /app
|
||||||
USER container
|
USER container
|
||||||
ENV USER=container \
|
ENV USER=container \
|
||||||
HOME=/home/container \
|
HOME=/home/container \
|
||||||
@ -23,9 +24,9 @@ ENV USER=container \
|
|||||||
HTTP_HOST=0.0.0.0 \
|
HTTP_HOST=0.0.0.0 \
|
||||||
HTTP_PORT=80
|
HTTP_PORT=80
|
||||||
WORKDIR /home/container
|
WORKDIR /home/container
|
||||||
COPY --from=builder --chown=container:container /build ./
|
COPY --from=builder --chown=container:container /build /app
|
||||||
EXPOSE ${HTTP_PORT}/tcp
|
EXPOSE ${HTTP_PORT}/tcp
|
||||||
ENTRYPOINT [ "/home/container/scripts/start.sh" ]
|
ENTRYPOINT [ "/app/scripts/start.sh" ]
|
||||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=60s \
|
HEALTHCHECK --interval=15s --timeout=5s --start-period=60s \
|
||||||
CMD curl -f http://localhost:${HTTP_PORT}/status || exit 1
|
CMD curl -f http://localhost:${HTTP_PORT}/status || exit 1
|
||||||
LABEL org.opencontainers.image.source=https://github.com/discord-tickets/bot \
|
LABEL org.opencontainers.image.source=https://github.com/discord-tickets/bot \
|
||||||
|
Loading…
Reference in New Issue
Block a user