darkwire.io/Dockerfile
Jeremie Pardou-Piquemal 27c0214c5e Fix build command
2022-12-29 14:45:45 +01:00

37 lines
1006 B
Docker

FROM node:18-alpine3.17
# Installing yarn
RUN apt update -y && \
apt install yarn=v1.22.4 -v -y
USER node:node
# Server environmental variables will be put into server/.env
ENV MAILGUN_API_KEY=api-key \
MAILGUN_DOMAIN=darkwire.io \
ABUSE_TO_EMAIL_ADDRESS=abuse@darkwire.io \
ABUSE_FROM_EMAIL_ADDRESS="Darkwire <no-reply@darkwire.io>" \
CLIENT_DIST_DIRECTORY='client/dist/'\
ROOM_HASH_SECRET='some-uuid'\
SITE_URL=https://darkwire.io \
STORE_BACKEND=memory
# Client configuration will be put into client/.env
ENV TZ=UTC \
VITE_API_HOST=localhost \
VITE_API_PROTOCOL=http \
VITE_API_PORT=3001 \
VITE_COMMIT_SHA=some_sha \
VITE_MAX_FILE_SIZE=4
COPY --chown=node:node . .
RUN yarn build
STOPSIGNAL SIGINT
EXPOSE 3001
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \
CMD [ "curl", "-f", "${VITE_API_PROTOCOL}://localhost:${VITE_API_PORT}", "||", "exit", "1" ]
ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD ["yarn", "start"]