From 250cc788df4c3279618d7dec5980e4b66a9c33c8 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 3 Feb 2025 12:41:27 -0700 Subject: [PATCH] Move mariadb configuration to a separate docker compose file --- README.md | 9 +++++++-- docker-compose-dev.yml | 12 ++++++++++++ docker-compose.yml | 12 ------------ 3 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 docker-compose-dev.yml diff --git a/README.md b/README.md index c0ddcee..121e745 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,21 @@ to connect to the database and update the packages list from GitHub. ## (For development only) Enable the database container -- Edit `docker-compose.yml` and uncomment the section for the `db` service - Edit `secrets/database.sql` and change the `BRO_USER_PASSWORD` value to match what is set in `secrets.env`. - Edit `secrets/.env` and change the `DB_HOST` value to `db` to map to the internal hostname for the docker database service. +- Run the following: + +``` +docker compose -f docker-compose-dev.yml build +docker compose -f docker-compose-dev.yml up -d +``` ## Run `docker-compose` ``` -docker-compose build +docker compose build docker compose up -d ``` diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..061d66e --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,12 @@ +services: + # Configuration for a mariadb service that can be used + # for testing on dev machines. + db: + build: + context: . + dockerfile: docker/Dockerfile.mariadb + restart: always + environment: + MARIADB_ROOT_PASSWORD: testing + volumes: + - ./data/mariadb:/var/lib/mysql:Z diff --git a/docker-compose.yml b/docker-compose.yml index b2ddb92..eb5746b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,15 +19,3 @@ services: dockerfile: docker/Dockerfile.php target: final restart: always - - # Configuration for a mariadb service that can be used - # for testing on dev machines. - # db: - # build: - # context: . - # dockerfile: docker/Dockerfile.mariadb - # restart: always - # environment: - # MARIADB_ROOT_PASSWORD: testing - # volumes: - # - ./data/mariadb:/var/lib/mysql:Z