deploy
This commit is contained in:
parent
b06ca2d99e
commit
138225401d
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 old-bpmn:latest .
|
||||
|
||||
- name: Stop old container
|
||||
run: docker rm -f old-bpmn || true
|
||||
|
||||
- name: Run
|
||||
run: |
|
||||
docker run -d \
|
||||
--name old-bpmn \
|
||||
--network traefik \
|
||||
--label "traefik.enable=true" \
|
||||
--label "traefik.http.routers.old-bpmn.rule=Host(\`old.bpmn.koptilnya.xyz\`)" \
|
||||
--label "traefik.http.routers.old-bpmn.entrypoints=websecure" \
|
||||
--label "traefik.http.routers.old-bpmn.tls.certresolver=myresolver" \
|
||||
--label "traefik.http.services.old-bpmn.loadbalancer.server.port=80" \
|
||||
old-bpmn:latest
|
||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
|
||||
FROM node:22-alpine
|
||||
RUN npm i -g serve
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/dist ./dist
|
||||
CMD ["serve", "-s", "dist", "-p", "80"]
|
||||
Loading…
x
Reference in New Issue
Block a user