-
Notifications
You must be signed in to change notification settings - Fork 203
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
fixed Docker container #353
Conversation
- use node:lts-alpine so it stays up to date + slims down container size - copy over package.json first so that container will only run npm install when deps change - explicitly expose port - run as node (aka not root)
- all config from the default github action as of jun 10 2024
revert slim install (forgot about separate client install)
moved NODE_ENV to after build commands (build was failing with sh: webpack not found
@nexus-uw Thanks a lot for the PR. Can you please expand a bit on the purpose of github workflow, where and how it's going to be used? |
it will build and publish the Docker container on each commit to the master branch
it will publish to the github Docker registry under muke1908/chat-e2ee
people who choose to selfhost chat-e2ee can pull in the latest changes to this project without having to pull the latest from GitHub. this is pretty handy if one is running Docker containers on a host that is running watchtower |
@nexus-uw can you please add this info to readme ? |
was defaulting to azure host in prod
Quality Gate passedIssues Measures |
3 further updates were added to this PR (since I'm lazing working against master in my fork)
|
|
||
RUN npm run build | ||
# todo - multi part build (lets us slim down container to not unclude all the webpack stuff) |
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 can work on this on the next PR.
currently the docker image is ~750MB. I believe a lot of this coming from the devDependencies
I was unable to run the docker container as it exists today in the repo. In order to fix it I:
sh: webpack command not found`)
additionally, I included the default GitHub action script to build + publish the container to the GitHub repo. this could be removed from the PR if not desired
testing
built + ran the Docker container