Migrated the Website service tooling to use PostgreSQL instead.
This commit is contained in:
@@ -23,31 +23,28 @@ services:
|
||||
# Local development database, started only with the `database` profile so a plain `docker compose up` still runs the
|
||||
# in-memory backend:
|
||||
#
|
||||
# docker compose --profile database up mariadb
|
||||
mariadb:
|
||||
image: mariadb:11
|
||||
# docker compose --profile database up postgres
|
||||
postgres:
|
||||
image: postgres:18
|
||||
container_name: ${HOST_OWNER:-loud}-db
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- database
|
||||
ports:
|
||||
- "127.0.0.1:${DATABASE_PORT:-3306}:3306"
|
||||
- "127.0.0.1:${DATABASE_PORT:-5432}:5432"
|
||||
environment:
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
||||
MARIADB_DATABASE: ${DATABASE_NAME:-loud-ams}
|
||||
MARIADB_USER: ${DATABASE_USERNAME:-loud-ams}
|
||||
MARIADB_PASSWORD: ${DATABASE_PASSWORD:-loud-ams}
|
||||
MARIADB_AUTO_UPGRADE: "1"
|
||||
command:
|
||||
- "--character-set-server=utf8mb4"
|
||||
- "--collation-server=utf8mb4_unicode_ci"
|
||||
POSTGRES_DB: ${DATABASE_NAME:-loud}
|
||||
POSTGRES_USER: ${DATABASE_USERNAME:-loud}
|
||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-loud}
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
test: ["CMD-SHELL", "pg_isready --username=$${POSTGRES_USER} --dbname=$${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
volumes:
|
||||
- ./Tests/DB:/var/lib/mysql
|
||||
# postgres:18 keeps its data directory under /var/lib/postgresql/<major>/docker, so the whole
|
||||
# /var/lib/postgresql tree is mounted — not the pre-18 /var/lib/postgresql/data path.
|
||||
- ./Tests/DB:/var/lib/postgresql
|
||||
|
||||
Reference in New Issue
Block a user