diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml new file mode 100644 index 0000000..77f9bf0 --- /dev/null +++ b/.github/workflows/publish-docker.yml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..06c09cc --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/package.json b/package.json index 807d4a0..a6195e2 100644 --- a/package.json +++ b/package.json @@ -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"