deploy
All checks were successful
Deploy / build (push) Successful in 50s

This commit is contained in:
Круглицкий Никита Витальевич 2025-11-20 21:26:07 +06:00
parent 43912bf607
commit 6c7e97149b
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,40 @@
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Keyscan
run: |
ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-strict: false
persist-credentials: false
- name: Build
run: docker build -t bpmn-api:latest .
- name: Stop old container
run: docker rm -f bpmn-api || true
- name: Run
run: |
docker run -d \
--name bpmn-api \
--network traefik \
--label "traefik.enable=true" \
--label "traefik.http.routers.bpmn-api.rule=Host(\`api.koptilnya.xyz\`) && PathPrefix(\`bpmn\`)" \
--label "traefik.http.routers.bpmn-api.entrypoints=websecure" \
--label "traefik.http.routers.bpmn-api.tls.certresolver=myresolver" \
--label "traefik.http.services.bpmn-api.loadbalancer.server.port=80" \
bpmn-api:latest

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
EXPOSE 80
CMD ["HOST=api.koptilnya.xyz/bpmn PORT=80 npx y-websocket"]