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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better docker deployment strategy #171

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Better docker deployment strategy #171

wants to merge 6 commits into from

Conversation

wearzdk
Copy link

@wearzdk wearzdk commented Dec 8, 2023

This is the PR submitted for #167. I've done some testing and made as small changes as possible to accomplish this feature.

Initially, I used Debian Bookworm for the build and run environments, but some strange errors occurred when running on older systems.
Then, I started to explore building and running it under Alpine, with surprisingly good results: Its final image artifact is now only 20MB! I think that's cool! 馃帀

There doesn't seem to be any issue with functionality from my basic testing since the current features aren't too numerous.
I've pushed a latest image to Docker Hub, you might want to give it a try:

docker run -d -p 8000:8000 --name screenshot-to-code wearzdk/screenshot-to-code:latest

To build it locally, run:

docker buildx build -t username/screenshot-to-code .

To push to Docker Hub (need to log in):

docker push username/screenshot-to-code:latest 

You could attempt to build and push it to Docker Hub, then supplement the readme as a deployment solution.

Copy link
Contributor

sweep-ai bot commented Dec 8, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

@weiwendu
Copy link

I installed it in Docker and it worked. So easy to deploy it. Thanks.

@etfromchina
Copy link

thanks pal, it works great!

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.

None yet

3 participants