Skip to content

Commit

Permalink
Merge pull request #176 from ngan/single-certs-dir
Browse files Browse the repository at this point in the history
Point mysql to certs instead of copying them
  • Loading branch information
composerinteralia authored Apr 8, 2024
2 parents 14e7dbc + 3ce209a commit fd5ded1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ services:
- --gtid-mode=ON
- --enforce-gtid-consistency=ON
- --log-bin=mysql-bin.log
- --ssl-ca=/mysql-certs/ca.pem
- --ssl-cert=/mysql-certs/server-cert.pem
- --ssl-key=/mysql-certs/server-key.pem
build:
context: .
dockerfile: Dockerfile.mysql
Expand Down
7 changes: 1 addition & 6 deletions docker-entrypoint-initdb.d/generate_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

cd /var/lib/mysql
cd /mysql-certs

# Generate a CA to test with

Expand Down Expand Up @@ -53,8 +53,3 @@ openssl x509 -req -sha256 -CA ca.pem -CAkey ca-key.pem -set_serial 2 \
-days 365 \
-in client-csr.pem \
-out client-cert.pem

# Copy the certificates to the shared directory so that it's accessible from the app
# container.

cp /var/lib/mysql/*.pem /mysql-certs
1 change: 1 addition & 0 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ output_fold() {
function cleanup() {
echo
echo "::group::Shutting down services..."
docker compose logs db
docker compose down --volumes
echo "::endgroup::"
}
Expand Down

0 comments on commit fd5ded1

Please sign in to comment.