Skip to content

[Update] Docker Integration and Environment Updates#16

Merged
ShuchirJ merged 6 commits into
ShuchirJ:mainfrom
vaddisrinivas:vaddisrinivas/containerize
Oct 18, 2024
Merged

[Update] Docker Integration and Environment Updates#16
ShuchirJ merged 6 commits into
ShuchirJ:mainfrom
vaddisrinivas:vaddisrinivas/containerize

Conversation

@vaddisrinivas

Copy link
Copy Markdown
Contributor

Summary:

This PR introduces Docker and Docker Compose support, along with minor adjustments on Flask and env


Key Changes:

  1. Docker Integration:

    • Added a Dockerfile for building the API using Python 3.13-slim.
    • Updated docker-compose.yml to include a build section for local image creation.
    • Configured the service to run on a custom bridge network (custom_bridge).
  2. Environment Variables:

    • Introduced APP_HOST, APP_PORT, and APP_DEBUG for easier configuration of the Flask app.
  3. Run Instructions updated on README:

    • Provided updated instructions for running the API via Docker, with both docker-compose and docker run commands.

Testing:

  • Ensure Docker and Docker Compose are installed.
  • Configure the .env file with appropriate environment variables.
  • Test both Docker run methods to verify the API runs correctly and the sync-data happens

@ShuchirJ

ShuchirJ commented Oct 18, 2024

Copy link
Copy Markdown
Owner

Looks good! Just made some changes regarding wording in the README and the network bridge. I don't think a custom network bridge is necessary at the moment. If you have any objections let me know, otherwise I can merge this.

@ShuchirJ

Copy link
Copy Markdown
Owner

Also another note- I think it might be nice to setup a github actions script to build an image automatically and publish it to ghcr moving forward. That way, the image is verified + always up to date.

@vaddisrinivas

vaddisrinivas commented Oct 18, 2024

Copy link
Copy Markdown
Contributor Author

TL;DR - lets merge!

I completely agree with pushing image via GHA to GHCR - I can add that in following commits - and all you need to do is add your GHCR creds to repo secrets.

For me - in my local testing Docker did not have access to requests coming from phone - but if its working for you without bridge - I am good - lmk!

@ShuchirJ

Copy link
Copy Markdown
Owner

I'm able to access it from another device- it's possible this was most likely a problem with DNS on your end

@ShuchirJ ShuchirJ merged commit 28557c2 into ShuchirJ:main Oct 18, 2024
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.

2 participants