feature/ci (#84)
Co-authored-by: openhands <openhands@all-hands.dev> Reviewed-on: https://codeberg.org/johba/harb/pulls/84
This commit is contained in:
parent
beefe22f90
commit
4277f19b68
41 changed files with 3149 additions and 298 deletions
57
docker/Dockerfile.landing-ci
Normal file
57
docker/Dockerfile.landing-ci
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# Production image for Landing page (Vite + Vue)
|
||||
# Used in CI for E2E testing - contains all code baked in
|
||||
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
RUN apk add --no-cache git bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files first for better caching
|
||||
COPY package.json package-lock.json ./
|
||||
COPY kraiken-lib/package.json kraiken-lib/package-lock.json ./kraiken-lib/
|
||||
COPY landing/package.json landing/package-lock.json ./landing/
|
||||
|
||||
# Copy ABI files needed by kraiken-lib
|
||||
COPY onchain/out/Kraiken.sol/Kraiken.json ./onchain/out/Kraiken.sol/
|
||||
COPY onchain/out/Stake.sol/Stake.json ./onchain/out/Stake.sol/
|
||||
|
||||
# Install kraiken-lib dependencies and build
|
||||
WORKDIR /app/kraiken-lib
|
||||
RUN npm ci --ignore-scripts
|
||||
COPY kraiken-lib/ ./
|
||||
RUN ./node_modules/.bin/tsc
|
||||
|
||||
# Install landing dependencies
|
||||
WORKDIR /app/landing
|
||||
RUN npm ci
|
||||
|
||||
# Copy landing source
|
||||
COPY landing/ ./
|
||||
|
||||
# Production image
|
||||
FROM node:20-alpine
|
||||
|
||||
RUN apk add --no-cache dumb-init wget bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy kraiken-lib (src for vite alias, dist for runtime)
|
||||
COPY --from=builder /app/kraiken-lib/src ./kraiken-lib/src
|
||||
COPY --from=builder /app/kraiken-lib/dist ./kraiken-lib/dist
|
||||
COPY --from=builder /app/kraiken-lib/package.json ./kraiken-lib/
|
||||
COPY --from=builder /app/landing ./landing
|
||||
|
||||
WORKDIR /app/landing
|
||||
|
||||
ENV NODE_ENV=development
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=5174
|
||||
|
||||
EXPOSE 5174
|
||||
|
||||
HEALTHCHECK --interval=5s --timeout=3s --retries=6 --start-period=10s \
|
||||
CMD wget --spider -q http://127.0.0.1:5174/ || exit 1
|
||||
|
||||
# Landing doesn't need contract addresses - just serve static content
|
||||
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5174"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue