From a78ca1866164b3283a7c09cfee11a3b9616a64b8 Mon Sep 17 00:00:00 2001 From: Affan Haq Date: Thu, 20 Aug 2020 13:23:45 -0400 Subject: [PATCH] added Dockerfile & Github actions flow --- .github/workflows/main.yaml | 15 +++++++++++++++ Dockerfile | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/main.yaml create mode 100644 Dockerfile diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..02c20f70 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,15 @@ +name: Publish Docker +on: + push: + branches: [ master ] +jobs: + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: haaaqs/umami:latest + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ed556aa7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:12.18-alpine + +COPY . /app +WORKDIR /app + +RUN npm install \ + && npm run build-mysql-client \ + && npm run build + +EXPOSE 3000 +CMD ["npm", "start"] \ No newline at end of file