This commit is contained in:
parent
43912bf607
commit
6c7e97149b
40
.gitea/workflows/deploy.yml
Normal file
40
.gitea/workflows/deploy.yml
Normal 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
9
Dockerfile
Normal 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"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user