Add Gitea CI and automatic dev deployment
This commit is contained in:
1 parent
543564a29c
commit
b4f29d4966
20 files changed
+1109
-29
No files matched your search
+15
-4
@@ -1,11 +1,22 @@
|
||||
FROM node:24-alpine AS build
|
||||
RUN corepack enable
|
||||
FROM node:24-alpine AS check
|
||||
RUN corepack enable && corepack prepare [email protected] --activate
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
COPY . .
|
||||
RUN pnpm build
|
||||
RUN pnpm lint:check && pnpm typecheck && pnpm test
|
||||
|
||||
FROM nginx:alpine
|
||||
FROM check AS build
|
||||
RUN pnpm build
|
||||
ARG APP_VERSION=source
|
||||
ARG APP_COMMIT=unknown
|
||||
ENV APP_VERSION=$APP_VERSION APP_COMMIT=$APP_COMMIT
|
||||
RUN node -e 'require("fs").writeFileSync("dist/version.json", JSON.stringify({version:process.env.APP_VERSION,commit:process.env.APP_COMMIT}))'
|
||||
|
||||
FROM nginx:alpine AS runtime
|
||||
ARG APP_VERSION=source
|
||||
ARG APP_COMMIT=unknown
|
||||
LABEL org.opencontainers.image.version=$APP_VERSION org.opencontainers.image.revision=$APP_COMMIT
|
||||
LABEL org.opencontainers.image.source=https://git.134333.xyz/eezd/AlphaPulse
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
Reference in new issue
Block a user