Repository includes Docker support for building and pushing images to GitHub Packages. Follow the steps below to build and push the Docker images.
Ensure you have Docker installed and running on your machine. You will also need to authenticate to the GitHub Packages to push the Docker images.
echo $GITHUB_TOKEN | docker login ghcr.io -u <your-github-username> --password-stdinAdjust docker.registry and homegae fields in package.json which are used to properly name the images and link them to your GitHub repository in GitHub Packages:
{
"homepage": "https://github.com/<your-github-username>/<your-repository-name>",
"docker": {
"registry": "ghcr.io/<your-github-username>/<your-repository-name>"
}
}To build the Docker images locally, you can use the following command:
pnpm docker:buildOnce the images are built, push them to GitHub Packages using the following command:
pnpm docker:pushRepository also includes a docker-compose.yml file for easier multi-container setup and orchestration. Use Docker Compose to start the services locally by running:
docker-compose upThis will spin up all defined services and link containers as needed.
A GitHub Actions workflow is already configured in this repository to automatically build and push Docker images to GitHub Packages whenever a new tag is pushed.