Skip to content

Commit

Permalink
feat: update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Oct 9, 2023
1 parent 1d1d9a8 commit dadb89a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: ci

on:
push:
branches:
- 'next'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: zhangtao25/canyon:${{ steps.extract_branch.outputs.branch }}
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:lts-alpine

MAINTAINER wr_zhang25

RUN mkdir -p /app
COPY . /app/
WORKDIR /app

RUN npm install pnpm -g
RUN pnpm i
RUN pnpm run build

EXPOSE 8080
CMD ["node", "packages/app-backend/dist/main.js" ]

0 comments on commit dadb89a

Please sign in to comment.