Skip to content

axioma-ai-labs/docker-compose-template

Repository files navigation

docker-compose-template

CI

Template for Docker Compose Orchestrations.

How to use

  1. Clone the repository
git clone https://github.com/axioma-ai-labs/docker-compose-template.git
  1. Copy environment variables
cp .env.example .env

Warning

Configure the environment variables with your own values. Pay attention to the REDIS_PASSWORD in the .env file. It must be the same as the password in the redis.conf file and respective to the REDIS_PASSWORD_FILE in the docker-compose.yml file.

  1. Create the volumes
mkdir -p volumes/postgres/data
mkdir -p volumes/redis/data
mkdir -p volumes/pgadmin/data

Give right permissions to the volumes

chmod -R 777 volumes
  1. Create the secrets
echo db-password >secrets/db-password
echo pgadmin-password >secrets/pgadmin-password

Give the right permissions to the secrets:

chmod -R 777 secrets

Warning

Configure the secrets with your own values!

Note

The redis-password must be the same as the password in the redis.conf file and REDIS_PASSWORD in the .env file. See next sections for more details.

  1. 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

mkdir -p config/redis
cp utils/redis/redis.conf config/redis

Give the right permissions to the directories:

chmod -R 777 config

Note

The redis.conf file is used to configure the redis database. The password must be the same as the password in the secrets/redis-password file and REDIS_PASSWORD in the .env file.

  1. 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.

  1. Run the docker compose
docker-compose up -d

Accessing the services

With the default configuration, you can access the services at the following ports:

About

Template for docker-compose files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published