doc: the --extra-build-args flag is ~ misleading when using build-webapp #716

Open
opened 2024-01-30 15:12:44 +00:00 by zramsay · 0 comments
Member

For example, the website needs this env var on image build:

laconic-so build-webapp --source-repo laconic.com/ --extra-build-args "--build-arg NEXT_PUBLIC_DATOCMS_BYPASS_TYPE='local_json'"

and although this will build without erroring, buried in the output is the following:
[Warning] One or more build-args [NEXT_PUBLIC_DATOCMS_BYPASS_TYPE] were not consumed

a quick google says I should modify the Dockerfile, which wouldn't make sense since build-webapp is using an image that we don't want to modify

the solution was to modify package.json like so:

-    "build": "next build",
+    "build": "NEXT_PUBLIC_DATOCMS_BYPASS_TYPE=local_json next build",

assigning myself as a documentation issue

For example, the website needs this env var on image build: `laconic-so build-webapp --source-repo laconic.com/ --extra-build-args "--build-arg NEXT_PUBLIC_DATOCMS_BYPASS_TYPE='local_json'"` and although this will build without erroring, buried in the output is the following: `[Warning] One or more build-args [NEXT_PUBLIC_DATOCMS_BYPASS_TYPE] were not consumed` a quick google says I should [modify the Dockerfile](https://stackoverflow.com/questions/49651369/docker-one-or-more-build-args-were-not-consumed), which wouldn't make sense since `build-webapp` is using an image that we don't want to modify the solution was to modify `package.json` like so: ``` - "build": "next build", + "build": "NEXT_PUBLIC_DATOCMS_BYPASS_TYPE=local_json next build", ``` assigning myself as a documentation issue
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#716
No description provided.