-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52f501a
commit 9cf992d
Showing
14 changed files
with
9,600 additions
and
32,754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,4 +72,5 @@ data | |
omelette | ||
*.old | ||
*~ | ||
src/addons | ||
src/develop | ||
npm-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,76 @@ | ||
# Based on https://github.com/plone/volto/blob/master/entrypoint.sh | ||
|
||
FROM node:10-jessie | ||
FROM node:10-jessie as build | ||
|
||
ARG NPM_CONFIG_REGISTRY | ||
ARG MAX_OLD_SPACE_SIZE=8192 | ||
|
||
ENV NODE_OPTIONS=--max_old_space_size=$MAX_OLD_SPACE_SIZE | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install -y git bsdmainutils | ||
RUN apt-get update -y \ | ||
&& apt-get install -y git bsdmainutils vim-nox mc \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV NODE_OPTIONS=--max_old_space_size=4096 | ||
RUN npm i -g mrs-developer | ||
|
||
WORKDIR /opt/frontend/ | ||
|
||
COPY docker-image.txt / | ||
COPY . . | ||
# RUN chmod +x optimize_node_modules.sh | ||
|
||
RUN mkdir -p /opt/frontend/src/develop | ||
|
||
RUN chown -R node /opt/frontend | ||
|
||
RUN rm -rf node_modules | ||
USER node | ||
|
||
RUN npm install mr-developer | ||
RUN echo "prefix = \"/home/node\"\n" > /home/node/.npmrc | ||
RUN rm -rf node_modules .git package-lock.json | ||
|
||
RUN node_modules/.bin/mrdeveloper --config=jsconfig.json --no-config --output=addons | ||
# RUN npm install mr-developer | ||
|
||
RUN NPM_CONFIG_REGISTRY=http://127.0.0.1:4873 npm install | ||
#RUN node_modules/.bin/mrdeveloper --config=jsconfig.json --no-config --output=addons | ||
RUN missdev | ||
|
||
RUN make clean-addons | ||
RUN rm -f package.json.lock | ||
RUN make activate-all | ||
|
||
# RUN NPM_CONFIG_REGISTRY=$NPM_CONFIG_REGISTRY npm ci | ||
RUN NPM_CONFIG_REGISTRY=$NPM_CONFIG_REGISTRY npm install | ||
|
||
# RUN ./optimize_node_modules.sh | ||
# RUN make clean-addons | ||
# RUN rm -f package-lock.json | ||
|
||
RUN RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn build | ||
|
||
COPY entrypoint-prod.sh entrypoint.sh | ||
# Second stage build | ||
FROM node:10-jessie | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y git bsdmainutils vim-nox mc \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /opt/frontend/ | ||
|
||
COPY entrypoint-prod.sh /opt/frontend/entrypoint.sh | ||
RUN chmod +x entrypoint.sh | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
COPY --from=build /opt/frontend/public ./public | ||
COPY --from=build /opt/frontend/build ./build | ||
|
||
RUN chown -R node /opt/frontend | ||
|
||
USER node | ||
|
||
RUN rm -rf package-lock.json | ||
RUN NPM_CONFIG_REGISTRY=$NPM_CONFIG_REGISTRY npm install --production | ||
|
||
ENTRYPOINT ["/opt/frontend/entrypoint.sh"] | ||
|
||
EXPOSE 3000 3001 4000 4001 | ||
|
||
CMD yarn start:prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"volto-mosaic": { | ||
"url": "https://github.com/eea/volto-mosaic.git", | ||
"path": "src" | ||
}, | ||
"volto-datablocks": { | ||
"url": "https://github.com/eea/volto-datablocks.git", | ||
"path": "src" | ||
}, | ||
"volto-blocks": { | ||
"url": "https://github.com/eea/volto-blocks.git", | ||
"path": "src" | ||
}, | ||
"volto-addons": { | ||
"url": "https://github.com/eea/volto-addons.git", | ||
"path": "src" | ||
}, | ||
"volto-ckeditor": { | ||
"url": "https://github.com/eea/volto-ckeditor.git", | ||
"path": "src" | ||
}, | ||
"volto-drafteditor": { | ||
"url": "https://github.com/eea/volto-drafteditor.git", | ||
"path": "src" | ||
}, | ||
"volto-plotlycharts": { | ||
"url": "https://github.com/eea/volto-plotlycharts.git", | ||
"path": "src" | ||
}, | ||
"volto-sidebar": { | ||
"url": "https://github.com/eea/volto-sidebar.git", | ||
"path": "src" | ||
}, | ||
"volto-base": { | ||
"url": "https://github.com/eea/volto-base.git", | ||
"path": "src" | ||
}, | ||
"volto-embed": { | ||
"url": "https://github.com/eea/volto-embed.git", | ||
"path": "src" | ||
} | ||
} |
Oops, something went wrong.