Skip to content

Commit

Permalink
🔧 Add configuration for docker compose to start a local database server
Browse files Browse the repository at this point in the history
#668

Signed-off-by: Marcus Fihlon <marcus@fihlon.swiss>
  • Loading branch information
McPringle committed Oct 12, 2024
1 parent 6534cc7 commit 82dea5f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MARIADB_DATABASE=komunumo
MARIADB_USER=komunumo
MARIADB_PASSWORD=komunumo
MARIADB_DATA=./.mariadb/data
2 changes: 2 additions & 0 deletions .mariadb/data/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory is used by the MariaDB database which can be run locally using Docker Compose.
Don't delete it and don't commit it's contents.
22 changes: 22 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:

db:
image: mariadb:lts
restart: always
ports:
- "3306:3306"
environment:
MARIADB_RANDOM_ROOT_PASSWORD: true
MARIADB_DATABASE: ${MARIADB_DATABASE}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
volumes:
- type: bind
source: ${MARIADB_DATA}
target: /var/lib/mysql

adminer:
image: adminer
restart: always
ports:
- "4000:8080"

0 comments on commit 82dea5f

Please sign in to comment.