Skip to content

Commit

Permalink
Add autoupgrade and mariadb conf
Browse files Browse the repository at this point in the history
  • Loading branch information
fauust committed Oct 17, 2024
1 parent 99ef331 commit bcc6c34
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docker-compose/generate-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

START_TEMPLATE = """
---
version: "3.7"
services:
mariadb:
image: mariadb:10.11
Expand All @@ -39,11 +38,13 @@
- MARIADB_DATABASE=buildbot
- MARIADB_USER=buildmaster
- MARIADB_PASSWORD=password
- MARIADB_AUTO_UPGRADE=1
network_mode: host
healthcheck:
test: ['CMD', "mariadb-admin", "--password=password", "--protocol", "tcp", "ping"]
volumes:
- ./mariadb:/var/lib/mysql:rw
- ./mariadb.cnf:/etc/mysql/conf.d/mariadb.cnf:ro
logging:
driver: journald
options:
Expand Down Expand Up @@ -96,8 +97,10 @@
- /srv/buildbot/master/docker-compose/start-bbm-web.sh
network_mode: host
depends_on:
- mariadb
- crossbar
mariadb:
condition: service_healthy
crossbar:
condition: service_started
"""

DOCKER_COMPOSE_TEMPLATE = """
Expand All @@ -113,8 +116,10 @@
- "/srv/buildbot/master/docker-compose/start.sh {master_directory}"
network_mode: host
depends_on:
- mariadb
- crossbar
mariadb:
condition: service_healthy
crossbar:
condition: service_started
"""


Expand Down
8 changes: 8 additions & 0 deletions docker-compose/mariadb.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[mariadb]

slow_query_log
log_slow_verbosity = query_plan,explain,engine
log_slow_query_time = 0.5
innodb_buffer_pool_size = 4G # FIXME: find a solution for DEV and PROD not being ISO
innodb_log_file_size = 4G # FIXME: find a solution for DEV and PROD not being ISO
innodb_io_capacity = 2000

0 comments on commit bcc6c34

Please sign in to comment.