Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "server"]
path = server
url = https://github.com/getodk/central-backend.git
[submodule "client"]
path = client
url = https://github.com/getodk/central-frontend.git
1 change: 0 additions & 1 deletion client
Submodule client deleted from 56b6bb
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ services:
build:
context: .
dockerfile: nginx.dockerfile
args:
FRONTEND_REPO: alxndrsn/odk-central-frontend

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FRONTEND_REPO: alxndrsn/odk-central-frontend

FRONTEND_VERSION: v0.0.0-oidjfroifgjroijgfoijdg

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a real version or RC.

depends_on:
- service
- enketo
Expand Down
6 changes: 2 additions & 4 deletions files/prebuild/build-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
set -o pipefail
shopt -s inherit_errexit

cd client

if [[ ${SKIP_FRONTEND_BUILD-} != "" ]]; then
echo "[build-frontend] Skipping frontend build."

Expand Down Expand Up @@ -42,6 +40,6 @@ if [[ ${SKIP_FRONTEND_BUILD-} != "" ]]; then

exit
else
npm clean-install --no-audit --fund=false --update-notifier=false
NODE_OPTIONS="--max-old-space-size=2048" npm run build
curl --location "https://github.com/$FRONTEND_REPO/releases/download/$FRONTEND_VERSION/dist-$FRONTEND_VERSION.tar.gz" -o dist.tar.gz
tar --extract --file dist.tar.gz
fi
6 changes: 5 additions & 1 deletion nginx.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ FROM node:24.14.1-slim AS intermediate

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
&& rm -rf /var/lib/apt/lists/*

COPY ./ ./
RUN files/prebuild/write-version.sh

ARG SKIP_FRONTEND_BUILD
ARG FRONTEND_REPO=getodk/frontend
ARG FRONTEND_VERSION
RUN files/prebuild/build-frontend.sh


Expand Down Expand Up @@ -39,7 +43,7 @@ COPY files/nginx/setup-odk.sh \
COPY files/nginx/redirector.conf /usr/share/odk/nginx/
COPY files/nginx/common-headers.conf /usr/share/odk/nginx/
COPY files/nginx/robots.txt /usr/share/nginx/html
COPY --from=intermediate client/dist/ /usr/share/nginx/html
COPY --from=intermediate dist/ /usr/share/nginx/html
COPY --from=intermediate /tmp/version.txt /usr/share/nginx/html

ENTRYPOINT [ "/scripts/setup-odk.sh" ]
Loading