Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Fix docker compose error and improve developer experience#282

Merged
calvinrp merged 8 commits intobytecodealliance:mainfrom
danny900714:docker
May 14, 2024
Merged

Fix docker compose error and improve developer experience#282
calvinrp merged 8 commits intobytecodealliance:mainfrom
danny900714:docker

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
@danny900714
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants