From 2cbf8be67c2a6c076b5907e612d4d2d760f581d8 Mon Sep 17 00:00:00 2001 From: emil-lengman Date: Wed, 12 Aug 2020 18:05:54 +0200 Subject: [PATCH] dockerfile for building an image out of darkwire --- Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5753ab1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM node:14.7.0-stretch + +# 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 " \ + CLIENT_DIST_DIRECTORY='client/dist/path'\ + ROOM_HASH_SECRET='some-uuid'\ + SITE_URL=https://darkwire.io \ + STORE_BACKEND=redis \ + STORE_HOST=redis://localhost:6379 + +# Client configuration will be put into client/.env +ENV TZ=UTC \ + REACT_APP_API_HOST=localhost \ + REACT_APP_API_PROTOCOL=http \ + REACT_APP_API_PORT=3001 \ + REACT_APP_COMMIT_SHA=some_sha \ + REACT_APP_COMMIT_SHA=some_sha \ + REACT_APP_MAX_FILE_SIZE=4 + +COPY --chown=node:node . . + +RUN yarn build + +EXPOSE 3001 + +ENTRYPOINT [ "docker-entrypoint.sh" ] +CMD ["yarn", "start"] \ No newline at end of file