Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
20 lines
834 B
Docker
20 lines
834 B
Docker
# Build context: repository root.
|
|
FROM node:22-alpine AS build
|
|
RUN corepack enable
|
|
WORKDIR /repo
|
|
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json tsconfig.base.json ./
|
|
COPY shared ./shared
|
|
COPY mobile-client ./mobile-client
|
|
RUN pnpm install --frozen-lockfile --filter @cardy/mobile-client...
|
|
# CARDY_UPDATE_URL is baked into the web build (where the Android app looks for live updates).
|
|
ARG CARDY_UPDATE_URL=https://dev.aggtaa.com/m/android
|
|
ENV CARDY_UPDATE_URL=$CARDY_UPDATE_URL
|
|
RUN pnpm --filter @cardy/mobile-client exec vite build
|
|
|
|
FROM nginxinc/nginx-unprivileged:alpine
|
|
COPY docker/nginx-mobile.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /repo/mobile-client/dist /usr/share/nginx/html
|
|
# Android updates (version.json, bundles, APK) published with `publish:android*` are mounted here.
|
|
VOLUME /updates
|
|
EXPOSE 10003
|