Skip to content

Commit

Permalink
ci: fix dockerfile and add deploy back
Browse files Browse the repository at this point in the history
  • Loading branch information
supersonictw committed Nov 7, 2024
1 parent 787247f commit d667c84
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

deploy-service:
name: Deploy application as service
needs: build-and-push-image
runs-on: ubuntu-latest

steps:
- name: Trigger deploy webhook
uses: wei/curl@master
with:
args: ${{ vars.DEPLOY_WEBHOOK_URL }}?secret=${{ secrets.DEPLOY_WEBHOOK_SECRET }}
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ FROM node:20

ENV RUNTIME_ENV container

RUN adduser -u 3000 -D recv
RUN useradd -u 3000 recv

RUN mkdir -p \
/home/recv \
/workplace

RUN mkdir -p /.npm /workplace
WORKDIR /workplace
ADD . /workplace

RUN chown -R \
3000:3000 \
/.npm /workplace
/home/recv \
/workplace

USER 3000
RUN npm install

EXPOSE 3000
CMD ["npm", "start"]

0 comments on commit d667c84

Please sign in to comment.