Allow more flexible development DB config

This commit is contained in:
Emi Matchu 2025-11-11 12:20:25 -08:00
parent 4e2c99d4dd
commit b257de85f2
2 changed files with 12 additions and 9 deletions

View file

@ -20,11 +20,14 @@ services:
depends_on: depends_on:
- mysql - mysql
environment:
DB_USER: root
mysql: mysql:
image: mariadb:10.6 image: mariadb:10.6
restart: unless-stopped restart: unless-stopped
environment: environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'true' MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
volumes: volumes:
- mysql-data:/var/lib/mysql - mysql-data:/var/lib/mysql
networks: networks:

View file

@ -3,7 +3,7 @@ development:
adapter: mysql2 adapter: mysql2
host: <%= ENV.fetch("DB_HOST", "localhost") %> host: <%= ENV.fetch("DB_HOST", "localhost") %>
database: openneo_impress database: openneo_impress
username: root username: <%= ENV.fetch("DB_USER", ENV.fetch("USER", "root")) %>
pool: 5 pool: 5
encoding: utf8mb4 encoding: utf8mb4
collation: utf8mb4_unicode_520_ci collation: utf8mb4_unicode_520_ci
@ -14,7 +14,7 @@ development:
adapter: mysql2 adapter: mysql2
host: <%= ENV.fetch("DB_HOST", "localhost") %> host: <%= ENV.fetch("DB_HOST", "localhost") %>
database: openneo_id database: openneo_id
username: root username: <%= ENV.fetch("DB_USER", ENV.fetch("USER", "root")) %>
pool: 2 pool: 2
variables: variables:
sql_mode: TRADITIONAL sql_mode: TRADITIONAL
@ -25,7 +25,7 @@ test:
adapter: mysql2 adapter: mysql2
host: <%= ENV.fetch("DB_HOST", "localhost") %> host: <%= ENV.fetch("DB_HOST", "localhost") %>
database: openneo_impress_test database: openneo_impress_test
username: root username: <%= ENV.fetch("DB_USER", ENV.fetch("USER", "root")) %>
pool: 5 pool: 5
encoding: utf8mb4 encoding: utf8mb4
collation: utf8mb4_unicode_520_ci collation: utf8mb4_unicode_520_ci
@ -36,7 +36,7 @@ test:
adapter: mysql2 adapter: mysql2
host: <%= ENV.fetch("DB_HOST", "localhost") %> host: <%= ENV.fetch("DB_HOST", "localhost") %>
database: openneo_id_test database: openneo_id_test
username: root username: <%= ENV.fetch("DB_USER", ENV.fetch("USER", "root")) %>
pool: 2 pool: 2
variables: variables:
sql_mode: TRADITIONAL sql_mode: TRADITIONAL