2026-06-27 02:26:33 +00:00
|
|
|
# Local development overrides.
|
2026-07-30 06:33:57 +00:00
|
|
|
# Compose merges this file on top of docker-compose.yml automatically, so a plain `docker compose up` builds from
|
|
|
|
|
# source instead of pulling a registry image:
|
2026-06-27 02:26:33 +00:00
|
|
|
#
|
|
|
|
|
# docker compose up --build # build locally and run
|
|
|
|
|
# docker compose up -d # reuse the last local build
|
|
|
|
|
#
|
2026-07-30 06:33:57 +00:00
|
|
|
# It reuses the `image:` name from the base file, so the local build is tagged the same way the production image would
|
|
|
|
|
# be.
|
2026-06-27 02:26:33 +00:00
|
|
|
services:
|
|
|
|
|
website:
|
|
|
|
|
image: ${IMAGE_NAME}:${IMAGE_TAG:-latest}
|
|
|
|
|
platform: linux/arm64
|
|
|
|
|
build:
|
2026-07-09 23:00:55 +00:00
|
|
|
context: ../..
|
|
|
|
|
dockerfile: Services/Website/Dockerfile
|
2026-06-27 02:26:33 +00:00
|
|
|
environment:
|
|
|
|
|
LOG_LEVEL: debug
|
2026-07-11 09:15:58 +00:00
|
|
|
DATABASE_DRIVER: ${DATABASE_DRIVER:-inMemory}
|
|
|
|
|
DATABASE_HOST: ${DATABASE_HOST:-localhost}
|
|
|
|
|
DATABASE_TLS: ${DATABASE_TLS:-off}
|
|
|
|
|
|
2026-07-30 06:33:57 +00:00
|
|
|
# Local development database, started only with the `database` profile so a plain `docker compose up` still runs the
|
|
|
|
|
# in-memory backend:
|
2026-07-11 09:15:58 +00:00
|
|
|
#
|
|
|
|
|
# docker compose --profile database up mariadb
|
|
|
|
|
mariadb:
|
|
|
|
|
image: mariadb:11
|
2026-07-11 16:09:28 +02:00
|
|
|
container_name: ${HOST_OWNER:-site}-db
|
2026-07-11 09:15:58 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
|
profiles:
|
|
|
|
|
- database
|
|
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:${DATABASE_PORT:-3306}:3306"
|
|
|
|
|
environment:
|
|
|
|
|
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
2026-07-11 16:09:28 +02:00
|
|
|
MARIADB_DATABASE: ${DATABASE_NAME:-site}
|
|
|
|
|
MARIADB_USER: ${DATABASE_USERNAME:-site}
|
|
|
|
|
MARIADB_PASSWORD: ${DATABASE_PASSWORD:-site}
|
2026-07-11 09:15:58 +00:00
|
|
|
MARIADB_AUTO_UPGRADE: "1"
|
|
|
|
|
command:
|
|
|
|
|
- "--character-set-server=utf8mb4"
|
|
|
|
|
- "--collation-server=utf8mb4_unicode_ci"
|
|
|
|
|
security_opt:
|
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 10
|
|
|
|
|
start_period: 30s
|
|
|
|
|
volumes:
|
|
|
|
|
- ./Tests/DB:/var/lib/mysql
|