build: add Dockerfile and compose for dev

This commit is contained in:
Kilian Decaderincourt 2021-09-08 12:20:19 +02:00
parent ad14da6af7
commit 1de829e192
3 changed files with 40 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
*
!package*.json
!dist

14
Dockerfile Normal file
View File

@ -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"]

23
docker-compose.yml Normal file
View File

@ -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"