Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ concurrency:
cancel-in-progress: true

jobs:
knip:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- run: pnpm install --frozen-lockfile
- run: pnpm knip

lint:
runs-on: ubuntu-24.04
steps:
Expand All @@ -35,6 +22,7 @@ jobs:
with:
node-version-file: .nvmrc
- run: pnpm install --frozen-lockfile
- run: pnpm exec knip
- run: pnpm exec fumadocs-mdx docs.config.ts
- run: pnpm exec next typegen
- run: pnpm exec oxlint .
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
COMMIT_SHA=${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/kuestcom/prediction-market:main
cache-to: type=inline

- name: Export image digest
shell: bash
Expand Down
12 changes: 5 additions & 7 deletions infra/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ ENV NEXT_TELEMETRY_DISABLED=1
ENV PNPM_HOME=/pnpm
ENV PATH=$PNPM_HOME:$PATH

ARG COMMIT_SHA=unknown

ENV COMMIT_SHA=$COMMIT_SHA

RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 make g++ \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -20,18 +16,17 @@ RUN corepack enable \
RUN pnpm install --frozen-lockfile

COPY . .
ARG COMMIT_SHA=unknown
ENV COMMIT_SHA=$COMMIT_SHA
RUN pnpm build
RUN mkdir -p /tmp/runtime-node_modules \
&& cp -aL node_modules/postgres /tmp/runtime-node_modules/postgres

FROM node:24-bookworm-slim AS runner
WORKDIR /app

ARG COMMIT_SHA=unknown

ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV COMMIT_SHA=$COMMIT_SHA
ENV HOSTNAME=0.0.0.0
ENV PORT=3000
ENV PNPM_HOME=/pnpm
Expand All @@ -54,6 +49,9 @@ COPY --from=build --chown=nextjs:nodejs /app/scripts ./scripts
COPY --from=build --chown=nextjs:nodejs /app/src/lib/site-url.ts ./src/lib/site-url.ts
COPY --from=build --chown=nextjs:nodejs /app/src/lib/db/migrations ./src/lib/db/migrations

ARG COMMIT_SHA=unknown
ENV COMMIT_SHA=$COMMIT_SHA

USER nextjs

EXPOSE 3000
Expand Down