Allow more flexible development DB config
This commit is contained in:
parent
4e2c99d4dd
commit
b257de85f2
2 changed files with 12 additions and 9 deletions
|
|
@ -7,7 +7,7 @@ services:
|
||||||
dockerfile: .devcontainer/Dockerfile
|
dockerfile: .devcontainer/Dockerfile
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../..:/workspaces:cached
|
- ../..:/workspaces:cached
|
||||||
|
|
||||||
# Overrides default command so things don't shut down after the process ends.
|
# Overrides default command so things don't shut down after the process ends.
|
||||||
command: sleep infinity
|
command: sleep infinity
|
||||||
|
|
@ -18,17 +18,20 @@ services:
|
||||||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
|
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
|
||||||
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
||||||
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:
|
||||||
- default
|
- default
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql-data:
|
mysql-data:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue