Template for Docker Compose Orchestrations.
- Clone the repository
git clone https://github.com/axioma-ai-labs/docker-compose-template.git
- Copy environment variables
cp .env.example .env
Warning
Configure the environment variables with your own values.
- Create the volumes
mkdir -p volumes/postgres/data
mkdir -p volumes/redis/data
mkdir -p volumes/pgadmin/data
- Create the secrets
echo db-password >secrets/db-password
echo pgadmin-password >secrets/pgadmin-password
Warning
Configure the secrets with your own values!
- Setup the configuration
mkdir -p config/nginx
cp utils/nginx/nginx.conf config/nginx
mkdir -p config/pgadmin
cp utils/pgadmin/servers.json config/pgadmin
- Copy the override file
cp docker-compose.override.yml.dev docker-compose.override.yml
Note
The docker-compose.override.yml.dev
file is used to run the docker compose in development mode.
The docker-compose.override.yml.prod
file is used to scale the backend and frontend.
Review the ports and other settings in the docker-compose.override.yml
file.
- Run the docker compose
docker-compose up -d
With the default configuration, you can access the services at the following ports:
- Postgres: http://localhost:3020
- Redis: http://localhost:3030
- pgAdmin: http://localhost:3041