deploy
All checks were successful
Deploy / build (push) Successful in 1m14s

This commit is contained in:
Никита Круглицкий 2025-11-20 21:18:16 +06:00
parent e53c007293
commit 7944db21f2
3 changed files with 56 additions and 1 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:latest .
- name: Stop old container
run: docker rm -f bpmn || true
- name: Run
run: |
docker run -d \
--name bpmn \
--network traefik \
--label "traefik.enable=true" \
--label "traefik.http.routers.bpmn.rule=Host(\`bpmn.koptilnya.xyz\`)" \
--label "traefik.http.routers.bpmn.entrypoints=websecure" \
--label "traefik.http.routers.bpmn.tls.certresolver=myresolver" \
--label "traefik.http.services.bpmn.loadbalancer.server.port=80" \
bpmn:latest

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build
FROM nginx:stable-alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -186,7 +186,7 @@ export function useCollaborativeFlow(diagramId: MaybeRefOrGetter<string>) {
return
provider.value = new WebsocketProvider(
'ws://localhost:1234',
import.meta.env.DEV ? 'ws://localhost:1234' : 'wss://api/koptilnya.xyz/bpmn',
diagramId,
yDoc,
)