Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose V2 #226

Merged
merged 4 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
version: "3.9"
volumes:
db-store:
psysh-store:

configs:
db-config:
file: ./infra/docker/mysql/my.cnf

services:
app:
build:
Expand Down Expand Up @@ -53,6 +57,9 @@ services:
published: ${DB_PUBLISHED_PORT:-3306}
protocol: tcp
mode: host
configs:
- source: db-config
target: /etc/my.cnf
volumes:
- type: volume
source: db-store
Expand Down
4 changes: 3 additions & 1 deletion infra/docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ FROM mysql/mysql-server:8.0

ENV TZ=UTC

COPY ./infra/docker/mysql/my.cnf /etc/my.cnf
RUN mkdir /var/log/mysql \
&& chown mysql:mysql $_ \
&& chmod 777 $_
6 changes: 3 additions & 3 deletions infra/docker/mysql/my.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ default-time-zone = SYSTEM
log_timestamps = SYSTEM

# Error Log
log-error = mysql-error.log
log-error = /var/log/mysql/mysql-error.log

# Slow Query Log
slow_query_log = 1
slow_query_log_file = mysql-slow.log
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 1.0
log_queries_not_using_indexes = 0

# General Log
general_log = 1
general_log_file = mysql-general.log
general_log_file = /var/log/mysql/mysql-general.log

[mysql]
default-character-set = utf8mb4
Expand Down