This repository contains a docker compose configuration to deploy all hexagon services. The guide below will show you how to set it up.
To get started with this project, you will need docker installed on your machine. If you haven't set up docker yet, follow this guide for detailed installation instructions suitable for your operating system.
Once installed, you can verify that docker is correctly set up by running the following command in your terminal:
docker --version
To set up the project locally, clone the repository using the following command. Ensure you're pulling submodules recursively and only shallow cloning to reduce unnecessary data:
git clone --recurse-submodules --shallow-submodules https://github.com/hexis-revival/hexagon-deploy.git
This will clone the entire project, including all necessary submodules that contain additional configurations or dependencies.
Before starting the services, you need to configure the environment variables. A template is provided in the .example.env
file. Copy this file and create a new .env
file where you will define your specific settings:
cp .example.env .env
With docker set up and the environment configured, you can now launch Hexagon using docker compose. From the root of the project directory, run the following command:
docker compose up -d
The -d
flag stands for "detached mode", which means the containers will run in the background, freeing up your terminal for other tasks.
If you need to stop the server at any point, you can do so by running:
docker compose stop
This will gracefully shut down all running containers.
In cases where you’ve made changes to the configuration files or the code and don’t see the expected results, you may need to rebuild your docker images. To do this, execute the following:
docker compose build
After rebuilding, restart the containers to apply the changes:
docker compose up -d
This ensures that any updates to your files are correctly applied to the services.
Hexagon may receive updates periodically. It’s recommended to pull in the latest changes regularly to ensure you're running the most up-to-date version.
To begin updating, navigate to the root of the project and pull the latest changes:
git pull
Since the project includes submodules, you will also need to update them to match the latest state:
git submodule update --recursive
After updating the repository and submodules, rebuild the docker images and restart the containers to apply the updates:
docker compose build
docker compose up -d
Following these steps ensures that your services are always running the latest version with all relevant updates applied.