-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
45 lines (43 loc) · 1.77 KB
/
Copy pathcompose.dev.yml
File metadata and controls
45 lines (43 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Development MariaDB for the local `./gradlew runServer` test server.
#
# Managed by the startDevDb / stopDevDb / resetDevDb Gradle tasks in
# realty-paper/build.gradle.kts; runServer depends on startDevDb, so a plain
# `./gradlew runServer` brings this up first and points the plugin at it.
#
# This is a DEVELOPMENT database. The credentials are deliberately trivial and
# the port is published to localhost — do not reuse this file for anything
# reachable from outside your machine.
# Distinct project name: see the note in compose.yml. Without it, running `up` with
# compose.yml or compose.local.yml would delete the dev database container this file
# owns, which the Gradle startDevDb/stopDevDb/resetDevDb tasks manage.
name: realty-dev
services:
mariadb:
# Pinned to the same image the Testcontainers-backed tests use
# (realty-backend AbstractDatabaseTest) so dev and test run one engine.
image: mariadb:11.7
container_name: realty-dev-mariadb
restart: unless-stopped
environment:
MARIADB_DATABASE: realty
MARIADB_USER: realty
MARIADB_PASSWORD: realty
MARIADB_ROOT_PASSWORD: root
ports:
# Matches the url in the generated run/plugins/Realty/database.yml.
- "3306:3306"
volumes:
# Named volume, so regions/contracts/auctions survive a restart.
# `./gradlew resetDevDb` drops it for a clean schema.
- realty-dev-db:/var/lib/mysql
healthcheck:
# Ships with the mariadb image. `--connect` alone returns healthy before
# InnoDB has finished recovery, which lets the server race a DB that
# cannot yet serve queries.
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 12
start_period: 30s
volumes:
realty-dev-db: