amundsen
amundsen copied to clipboard
document how to build custom frontend without forking
Currently burried in a Slack thread
Please hAlp it out from there and into the developers guide/owners manual.
thanks @jornh , do you have time to put it in the faq doc?
cc @ttannis @danwom as well
I was looking to play around with this some and hopefully contribute some documentation, but the Slack thread seems to have disappeared in between when I started and now. I did manage to save this part of the discussion, however (sorry, I didn't catch the author of this message):
Yes, that's essentially what we have. The custom build script does the following:
- Copy public frontend static files into a temp directory .src-custom
- Copy folder containing custom config files into the same temp directory, overwriting any file with the same path/filename
- NPM install (or quick install which saves the previous installation)
- npm run build (or dev-build)
Then we run the server out of the customized build in .src-custom
https://gist.github.com/danwom/0a735b7137119b974c869a0342986f53
I was looking to play around with this some and hopefully contribute some documentation, but the Slack thread seems to have disappeared in between when I started and now. I did manage to save this part of the discussion, however (sorry, I didn't catch the author of this message):
Yes, that's essentially what we have. The custom build script does the following:
- Copy public frontend static files into a temp directory .src-custom
- Copy folder containing custom config files into the same temp directory, overwriting any file with the same path/filename
- NPM install (or quick install which saves the previous installation)
- npm run build (or dev-build)
Then we run the server out of the customized build in .src-custom https://gist.github.com/danwom/0a735b7137119b974c869a0342986f53
https://amundsenworkspace.slack.com/archives/CGFBVT23V/p1572454944194100
I recently faced this issue as well, and followed the thread where the gist came from, and this worked for me:
Dockerfile.frontend
# Additional steps in node-stage to get custom static conf files
RUN apt-get update && apt-get install -y rsync
ADD frontend /app/frontend/
WORKDIR /app/frontend/
RUN chmod 755 partnerized-static-build.sh
RUN ./partnerized-static-build.sh
# instead of CMD [ "python3", "amundsen_application/wsgi.py" ]
CMD [ "python3", "frontend/upstream/amundsen_application/wsgi.py" ]
docker-compose-yml
- STATIC_ROOT=.src-custom/static
command: ["sh", "-c", "cd /app/frontend/upstream && gunicorn -w 2 --bind :5005 amundsen_application.wsgi"]
Would someone like to add this our docs, perhaps an Install custom application
section in https://github.com/amundsen-io/amundsenfrontendlibrary/blob/master/docs/installation.md.
@instazackwu yeah, that will be super useful, would you create a pr about this note? thanks