-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gslux 635 use v4 release bundle #3180
base: integration-vue
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,8 @@ COPY geoportailv3_geoportal/static-ngeo /app/geoportailv3_geoportal/static-ngeo | |
RUN rm -rf /usr/lib/node_modules/ngeo | ||
RUN mv /app/geoportailv3_geoportal/static-ngeo/ngeo /usr/lib/node_modules/ngeo | ||
|
||
COPY . /app | ||
RUN mkdir -p /app | ||
COPY ./package.json /app | ||
|
||
# jsapi generation | ||
ADD ./jsapi /etc/apiv4/ | ||
|
@@ -45,17 +46,22 @@ RUN node --version | |
RUN npm install --no-optional && npm cache clear --force | ||
RUN /etc/apiv4/rebuild_api.sh | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
# sad fix, to allow webpack's file-loader to find files with query string & hash added | ||
RUN ln -s /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.eot /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.eot?#iefix && \ | ||
ln -s /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.svg /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.svg#fontawesome && \ | ||
ln -s /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.eot /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.eot?#iefix && \ | ||
ln -s /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.svg /usr/lib/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.svg#fontawesome | ||
|
||
|
||
# RUN make checks | ||
RUN make build | ||
|
||
RUN curl -L https://github.com/Geoportail-Luxembourg/luxembourg-geoportail/releases/download/$(cat v4_release.txt)/bundle.tgz > /tmp/bundle.tgz && \ | ||
tar -xzvf /tmp/bundle.tgz -C /tmp && \ | ||
mkdir -p /usr/lib/node_modules/luxembourg-geoportail && \ | ||
mv /tmp/bundle/ /usr/lib/node_modules/luxembourg-geoportail | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a big fan of manipulating the npm dependencies "manually" here, as the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you.
so in the end I do not feel too bad with this "hack", but I'll check if we can build a "fake" npm package to install via the git hash... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree with @tkohr There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, thanks for your great idea, so we can use npm to install the bundle, that gives more transparency |
||
|
||
RUN make apps | ||
RUN mv webpack.apps.js webpack.apps.js.tmpl | ||
# copy web component styles and translations from bundle to static-ngeo | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GSLUX-635_5278bb4fbd7496cbb092087899d106256e3154a0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get rid of the diff of the
Dockerfile
completely, as thenpm install
in between the two changes only concerns the JS API, if I see correctly. Thepackage.json
for the app is actually already copied in line 28.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main point of this diff is removing the
COPY . /app
and putting it after the jsapi buildbut yes, we can remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I don't get the advantage of moving
COPY . /app
, neither as theWORKDIR
changes, but I might be missing something.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By moving the cp . as late as possible we avoid all unnecessary docker build steps (npm install for jsapi and build jsapi) if the source code changes
This is just a build optimization which may reduce the image build time if something changes in app
We can leave the Dockerfile as is if that is more comfortable for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'm fine with moving the
COPY . /app