chore: update .gitignore, remove Dockerfile, and enhance documentation
quality / commitlint (push) Skipped
quality / changes (push) Successful in 18s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 1m31s
quality / web (push) Successful in 1m7s
quality / api (push) Failing after 40s
CD / quality (push) Failing after 3m43s
CD / publish (push) Skipped
quality / commitlint (push) Skipped
quality / changes (push) Successful in 18s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 1m31s
quality / web (push) Successful in 1m7s
quality / api (push) Failing after 40s
CD / quality (push) Failing after 3m43s
CD / publish (push) Skipped
- Added .release-version, CHANGELOG.md, and deploy/docker/docker-bake.override.hcl to .gitignore. - Removed Dockerfile as part of the cleanup. - Updated AGENTS.md and README.md to include new documentation on CI/Docker processes and deployment instructions. - Enhanced package.json with new devDependencies for commit linting and semantic release. - Updated pnpm-lock.yaml to reflect new dependencies and versions. These changes streamline the project structure and improve documentation clarity.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
# All-in-one EvoFirewall (Fastify + SPA + SQLite). Analog evobgp-all.
|
||||
# Install slugs GET /{slug} stay on the same process — do not split nginx.
|
||||
ARG BASE_NODE=docker.io/library/node:22-alpine
|
||||
|
||||
FROM ${BASE_NODE} AS deps
|
||||
WORKDIR /repo
|
||||
RUN apk add --no-cache python3 make g++ \
|
||||
&& corepack enable && corepack prepare [email protected] --activate
|
||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml turbo.json ./
|
||||
COPY apps/web/package.json apps/web/
|
||||
COPY apps/api/package.json apps/api/
|
||||
COPY packages/ui/package.json packages/ui/
|
||||
COPY packages/shared/package.json packages/shared/
|
||||
COPY packages/db/package.json packages/db/
|
||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
FROM deps AS build
|
||||
COPY apps/web apps/web
|
||||
COPY apps/api apps/api
|
||||
COPY packages/ui packages/ui
|
||||
COPY packages/shared packages/shared
|
||||
COPY packages/db packages/db
|
||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||
pnpm turbo build --filter=@evofw/web --filter=@evofw/api \
|
||||
&& pnpm --filter @evofw/api deploy --prod /out \
|
||||
&& cp -r apps/web/dist /out/static \
|
||||
&& mkdir -p /out/dist/agent-scripts \
|
||||
&& cp -r apps/api/src/agent-scripts/* /out/dist/agent-scripts/ \
|
||||
&& rm -rf /out/src /out/test /out/.turbo \
|
||||
&& rm -rf /out/node_modules/@evofw/db/src /out/node_modules/@evofw/db/.turbo \
|
||||
&& rm -rf /out/node_modules/@evofw/shared/src /out/node_modules/@evofw/shared/.turbo \
|
||||
&& find /out -name '*.map' -delete
|
||||
|
||||
FROM ${BASE_NODE} AS runtime
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache ca-certificates
|
||||
ARG VERSION=dev
|
||||
ARG GIT_SHA=unknown
|
||||
ARG BUILD_TIME=
|
||||
ENV NODE_ENV=production \
|
||||
STATIC_DIR=/app/static \
|
||||
DATABASE_URL=sqlite:/data/app.db \
|
||||
SERVER_PORT=8080 \
|
||||
APP_VERSION=${VERSION} \
|
||||
GIT_SHA=${GIT_SHA} \
|
||||
BUILD_TIME=${BUILD_TIME}
|
||||
COPY --from=build /out ./
|
||||
EXPOSE 8080
|
||||
VOLUME ["/data"]
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD ["node", "-e", "fetch('http://127.0.0.1:8080/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
||||
CMD ["node", "dist/server.js"]
|
||||
Reference in New Issue
Block a user