mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: lisa ci
This commit is contained in:
39
.github/deployment/Caddyfile-lisa
vendored
Normal file
39
.github/deployment/Caddyfile-lisa
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
:80 {
|
||||
reverse_proxy /api/* keck:3001
|
||||
@websockets {
|
||||
path /collaboration/*
|
||||
}
|
||||
reverse_proxy @websockets keck:3000
|
||||
reverse_proxy /* lisa:3001 {
|
||||
header_up Host lisa:3001
|
||||
}
|
||||
}
|
||||
|
||||
http://lisa:3001 {
|
||||
root /* ./dist
|
||||
|
||||
file_server {
|
||||
precompressed br
|
||||
}
|
||||
|
||||
encode {
|
||||
zstd
|
||||
gzip 9
|
||||
}
|
||||
|
||||
@notStatic {
|
||||
not path /*.css
|
||||
not path /*.js
|
||||
not path /*.png
|
||||
not path /*.jpg
|
||||
not path /*.svg
|
||||
not path /*.ttf
|
||||
not path /*.eot
|
||||
not path /*.woff
|
||||
not path /*.woff2
|
||||
}
|
||||
|
||||
handle @notStatic {
|
||||
try_files {path} /index.html
|
||||
}
|
||||
}
|
||||
21
.github/deployment/Dockerfile-lisa
vendored
Normal file
21
.github/deployment/Dockerfile-lisa
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM node:16-alpine as builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN apk add g++ make python3 git
|
||||
RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build
|
||||
|
||||
FROM node:16-alpine as relocate
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/dist/apps/ligo-virgo ./dist
|
||||
COPY --from=builder /app/.github/deployment/Caddyfile-lisa ./
|
||||
RUN rm ./dist/*.txt
|
||||
|
||||
# =============
|
||||
# lisa image
|
||||
# =============
|
||||
FROM caddy:2.4.6-alpine as lisa
|
||||
WORKDIR /app
|
||||
COPY --from=relocate /app .
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["caddy", "run"]
|
||||
1
.github/workflows/lisa.yml
vendored
1
.github/workflows/lisa.yml
vendored
@@ -53,6 +53,7 @@ jobs:
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
with:
|
||||
context: .
|
||||
file: ./.github/deployment/Dockerfile-lisa
|
||||
push: ${{ github.ref == 'refs/heads/master' && true || false }}
|
||||
tags: ${{ steps.meta_lisa.outputs.tags }}
|
||||
labels: ${{ steps.meta_lisa.outputs.labels }}
|
||||
|
||||
Reference in New Issue
Block a user