cloudunity commited on
Commit
1511f7f
·
verified ·
1 Parent(s): 54de716

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -5
Dockerfile CHANGED
@@ -18,7 +18,7 @@ FROM node:24-bookworm-slim AS webapp
18
  # which cannot read this repo's lockfile. 11.21.0 is the version declared in
19
  # devEngines and verified against pnpm-lock.yaml.
20
  RUN corepack enable && corepack prepare pnpm@11.21.0 --activate
21
- RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
22
 
23
  WORKDIR /build
24
 
@@ -36,8 +36,14 @@ RUN git init . \
36
  && git checkout FETCH_HEAD
37
 
38
  # Install deps. package.json's postinstall runs lexicons:generate and
39
- # intl:compile, which the webpack build needs.
40
- RUN pnpm install --frozen-lockfile || pnpm install --no-frozen-lockfile
 
 
 
 
 
 
41
 
42
  # postinstall generated lexicons + i18n catalogs; verify they exist (the
43
  # intl:compile-if-needed guard is skipped outside CI, so compile explicitly
@@ -49,7 +55,7 @@ RUN test -d src/lexicons && echo "[build] lexicons OK" \
49
  # Build the static web app with this PDS baked in as the default service,
50
  # so sign-in/sign-up default to this server (users can still pick another).
51
  # On HF Spaces, set a Space variable PDS_HOSTNAME and rebuild so this matches.
52
- ARG PDS_HOSTNAME=cloudunity-gemma-api1.hf.space
53
  ENV EXPO_PUBLIC_DEFAULT_SERVICE=https://${PDS_HOSTNAME}
54
  ENV EXPO_PUBLIC_BUNDLE_IDENTIFIER=rochester-pds
55
  ENV NODE_ENV=production
@@ -310,7 +316,10 @@ ENV PDS_EMAIL_FROM_ADDRESS=
310
  # Skip email confirmation flow entirely (no SMTP on HF)
311
  ENV PDS_EMAIL_DISABLE_CONFIRMATION_LINK=true
312
 
313
- # Public hostname. Users' handles will be <name>.<that hostname>.
 
 
 
314
  ENV PDS_HOSTNAME=cloudunity-gemma-api1.hf.space
315
 
316
  EXPOSE 7860
 
18
  # which cannot read this repo's lockfile. 11.21.0 is the version declared in
19
  # devEngines and verified against pnpm-lock.yaml.
20
  RUN corepack enable && corepack prepare pnpm@11.21.0 --activate
21
+ RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && rm -rf /var/lib/apt/lists/*
22
 
23
  WORKDIR /build
24
 
 
36
  && git checkout FETCH_HEAD
37
 
38
  # Install deps. package.json's postinstall runs lexicons:generate and
39
+ # intl:compile, which the webpack build needs. If the clone lost the lockfile
40
+ # (unlikely), fall back to a plain install.
41
+ RUN if [ -f pnpm-lock.yaml ]; then \
42
+ pnpm install --frozen-lockfile || pnpm install --no-frozen-lockfile; \
43
+ else \
44
+ echo "[build] pnpm-lock.yaml missing - regenerating" && \
45
+ pnpm install --no-frozen-lockfile; \
46
+ fi
47
 
48
  # postinstall generated lexicons + i18n catalogs; verify they exist (the
49
  # intl:compile-if-needed guard is skipped outside CI, so compile explicitly
 
55
  # Build the static web app with this PDS baked in as the default service,
56
  # so sign-in/sign-up default to this server (users can still pick another).
57
  # On HF Spaces, set a Space variable PDS_HOSTNAME and rebuild so this matches.
58
+ ARG PDS_HOSTNAME=hf.space
59
  ENV EXPO_PUBLIC_DEFAULT_SERVICE=https://${PDS_HOSTNAME}
60
  ENV EXPO_PUBLIC_BUNDLE_IDENTIFIER=rochester-pds
61
  ENV NODE_ENV=production
 
316
  # Skip email confirmation flow entirely (no SMTP on HF)
317
  ENV PDS_EMAIL_DISABLE_CONFIRMATION_LINK=true
318
 
319
+ # Public hostname. Set this to your Space's public URL (as a Space secret or
320
+ # variable named PDS_HOSTNAME) so the PDS advertises the right endpoint:
321
+ # https://<owner>-<space>.hf.space
322
+ # Users' handles will be <name>.<that hostname>.
323
  ENV PDS_HOSTNAME=cloudunity-gemma-api1.hf.space
324
 
325
  EXPOSE 7860