hash icon indicating copy to clipboard operation
hash copied to clipboard

Add Dockerfile for Graph

Open TimDiekmann opened this issue 3 years ago • 0 comments

🌟 What is the purpose of this PR?

It's easier to only run the docker container than to build the Rust projects, especially if you are not used to Rust. This PR adds a Dockerfile and builds it in the CI.

🔗 Related links

🔍 What does this change?

  • Add a Dockerfile
  • Add commands to the Makefile
  • Add a new CI step to build the docker container
    • We chose to not cache the layers of the docker build as the build is pretty fast. With caching we would require a caching infrastructure for Docker, and also upload/download will take a while. In addition, docker layers tend to be big. The final Docker container however is designed to be small (about 5 MB)
  • Support setting the address for the REST API socket
  • Drive-by: Create the volume used for postgres from docker-compose

📜 Does this require a change to the docs?

  • Instructions were added to the README on how to build/run/stop the docker container

🐾 Next steps

Host the docker image so it is not needed to rebuild it outside of the CI

🛡 What tests cover this?

  • The REST API is now tested using the Docker container

❓ How to test this?

  • Go to packages/graph/hash_graph
  • Run the commands provided in the README

TimDiekmann avatar Aug 11 '22 15:08 TimDiekmann