Skip to content

Commit

Permalink
Merge pull request #17 from SamuraiWTF/fix-db-size
Browse files Browse the repository at this point in the history
Reduce the size of the dojo-basic db container.
  • Loading branch information
JGillam authored Aug 20, 2023
2 parents e67001b + 26d2a2d commit fd77f37
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .shogun/Dockerfile.dojo-basic-db
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Dockerfile.dojo-basic--db
FROM mysql:latest
COPY .shogun/dojo-basic.sql /docker-entrypoint-initdb.d/
COPY .shogun/my.cnf /etc/mysql/my.cnf
RUN chown -R mysql:mysql /var/lib/mysql

LABEL org.opencontainers.image.source=https://github.com/SamuraiWTF/samurai-dojo
LABEL org.opencontainers.image.description="Database image for dojo-basic."
Expand Down
15 changes: 15 additions & 0 deletions .shogun/my.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mysqld]
max_connections = 10
key_buffer_size = 16K
max_allowed_packet = 1M
thread_stack = 128K
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_cache_size = 8
innodb_buffer_pool_size = 8M
innodb_log_buffer_size = 256K
performance_schema = OFF
skip_log_bin = ON

0 comments on commit fd77f37

Please sign in to comment.