Merge pull request #71 from NMinhNguyen/docker

Containerise socket server
This commit is contained in:
Kostas Bariotis 2020-07-29 18:58:42 +01:00 committed by GitHub
commit 35314725c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 1 deletions

20
.github/workflows/publish-docker.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Publish Docker
on:
push:
branches:
- master
jobs:
publish-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: excalidraw/excalidraw-room
tag_with_ref: true
tag_with_sha: true

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:12-alpine
WORKDIR /excalidraw-room
COPY package.json yarn.lock ./
RUN yarn
COPY tsconfig.json ./
COPY src ./src
RUN yarn build
EXPOSE 80
CMD ["yarn", "start"]

View File

@ -7,7 +7,6 @@
"build": "tsc",
"fix": "yarn prettier --write",
"lint": "yarn prettier --list-different",
"postinstall": "npm run build",
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"",
"start": "node dist/index.js",
"test": "yarn lint"