From 1de829e192b6930f077d1e5726f2b9c6c33995bb Mon Sep 17 00:00:00 2001 From: Kilian Decaderincourt Date: Wed, 8 Sep 2021 12:20:19 +0200 Subject: [PATCH] build: add Dockerfile and compose for dev --- .dockerignore | 3 +++ Dockerfile | 14 ++++++++++++++ docker-compose.yml | 23 +++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3256a9c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +* +!package*.json +!dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0fd108b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:16-alpine + +WORKDIR /app + +COPY package*.json ./ +RUN npm ci --prod + +COPY ./dist ./dist + +USER node + +EXPOSE 8080 + +ENTRYPOINT ["npm", "run", "start:prod"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..64025f2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3.8" + +services: + excalidraw: + image: kiliandeca/excalidraw + healthcheck: + disable: true + ports: + - "80:80" + environment: + BACKEND_V2_GET_URL: http://localhost:8080/api/v2/ + BACKEND_V2_POST_URL: http://localhost:8080/api/v2/ + SOCKET_SERVER_URL: http://localhost:5000/ + + excalidraw-storage-backend: + build: . + ports: + - "8080:8080" + + excalidraw-room: + image: excalidraw/excalidraw-room + ports: + - "5000:80" \ No newline at end of file