Merge branch 'setup' into template
This commit is contained in:
@@ -17,37 +17,36 @@ services:
|
||||
environment:
|
||||
LOG_LEVEL: debug
|
||||
DATABASE_DRIVER: ${DATABASE_DRIVER:-inMemory}
|
||||
DATABASE_HOST: ${DATABASE_HOST:-localhost}
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_TLS: ${DATABASE_TLS:-off}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
required: false
|
||||
|
||||
# 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:-site}-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:-site}
|
||||
MARIADB_USER: ${DATABASE_USERNAME:-site}
|
||||
MARIADB_PASSWORD: ${DATABASE_PASSWORD:-site}
|
||||
MARIADB_AUTO_UPGRADE: "1"
|
||||
command:
|
||||
- "--character-set-server=utf8mb4"
|
||||
- "--collation-server=utf8mb4_unicode_ci"
|
||||
POSTGRES_DB: ${DATABASE_NAME:-site}
|
||||
POSTGRES_USER: ${DATABASE_USERNAME:-site}
|
||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-site}
|
||||
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
|
||||
- ./Tests/DB:/var/lib/postgresql
|
||||
|
||||
Reference in New Issue
Block a user