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

Fix docker compose error and improve developer experience #282

Merged
merged 8 commits into from
May 14, 2024

Conversation

danny900714
Copy link
Contributor

After discussion with @calvinrp, we reached a consensus that improving the local development experience and documentation is important to make more developer participate in this project. This pull request resolves the following issues and makes some improvements:

  • Update Dockerfile with the following improvements
    • Fix previous docker build error
    • Update Rust and Debian base image to the latest version
    • Enable docker buildx cache for faster build time
    • Follow docker image best practice by installing minimal dependencies and running with non-root user
  • Update docker-compose.yaml and docker-compose.postgres.yaml to fix deployment error
    • Use the docker compose secret feature to manage confidential environment variables
    • Watch file changes and rebuild the container during local development
  • Add CONTRIBUTING.md to explain the local development process
  • Remove the old infra directory

@calvinrp
Copy link
Collaborator

calvinrp commented May 13, 2024

Thank you!

This looks good, but trying to run locally. The docker container for the warg-server is bound to the port but isn't responding to my HTTP requests. For both the in memory and Postgres implementations. Not sure what is going on. Still investigating.

@calvinrp calvinrp self-requested a review May 14, 2024 11:00
@calvinrp
Copy link
Collaborator

Thank you!

This looks good, but trying to run locally. The docker container for the warg-server is bound to the port but isn't responding to my HTTP requests. For both the in memory and Postgres implementations. Not sure what is going on. Still investigating.

Found the issue! In Docker, 127.0.0.1 is “this container” not “this machine”. We need to bind the warg-server to 0.0.0.0 instead of 127.0.0.1. Pushed that change.

@calvinrp calvinrp merged commit 0457e79 into bytecodealliance:main May 14, 2024
6 checks passed
@danny900714
Copy link
Contributor Author

Thanks for finding the problem! I'm also overwhelmed by that weird behavior.

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