Skip to content
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

Added docker image build script #245

Merged
merged 3 commits into from
Sep 21, 2023
Merged

Conversation

Kakoluz
Copy link
Contributor

@Kakoluz Kakoluz commented Sep 11, 2023

This PR adds the becesary files to build and serve a production ready docker image that uses the web version behind an nginx server. It is perfect for self hosted people like me. The build script is ready to be just ran and the image uploaded to as a "official" feishin docker image. the built image is around 200MB in size, 90MB compressed. Wich makes this a really light app.

It is note worthy that it might be necesary to change the port from 80 to something else as this settings are intended to be ran behind a proxy and not directly as a service, but some people might want to do it that way.

@vercel
Copy link

vercel bot commented Sep 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
feishin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 20, 2023 11:55pm

@jeffvli
Copy link
Owner

jeffvli commented Sep 13, 2023

Looks good! Have you tested any other base images (like alpine) to see if you can get it even smaller?

@Kakoluz
Copy link
Contributor Author

Kakoluz commented Sep 13, 2023

Not really, i will test it later and report back, i will also change the port to something else

@BlackDragon-B
Copy link
Contributor

i will also change the port to something else
Wouldn't you eliminate the need for this by using port bindings in docker?

@Kakoluz
Copy link
Contributor Author

Kakoluz commented Sep 13, 2023

i will also change the port to something else
Wouldn't you eliminate the need for this by using port bindings in docker?

Yes, but deploying a web app on port 80 by default and expect the user to change it. is not exactly a good practice

@Kakoluz
Copy link
Contributor Author

Kakoluz commented Sep 13, 2023

Using slim alpine nginx i managed to get the app down to around 20MB uncompressed. I also changed the port to something not reserved and somewhat easy to remember.

@jeffvli
Copy link
Owner

jeffvli commented Sep 20, 2023

I pushed a commit to update the dockerfile to use a multi-stage build so we can build the app directly, otherwise the dist files in /release/app/dist/web would need to be built manually.

@jeffvli jeffvli merged commit 18e35f2 into jeffvli:development Sep 21, 2023
@jeffvli jeffvli mentioned this pull request Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants