Skip to content

Commit

Permalink
Move mariadb configuration to a separate docker compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
timwoj committed Feb 3, 2025
1 parent 4058189 commit fcc4453
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
12 changes: 12 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fcc4453

Please sign in to comment.