Skip to content

Commit

Permalink
switch to local volume & add mariadb entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Jun 28, 2024
1 parent 41b6ac5 commit 8227288
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 2 additions & 7 deletions dmoj/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ services:
image: mariadb
restart: always
volumes:
- database:/var/lib/mysql/
- ./database/:/var/lib/mysql/
- ./scripts/mariadb:/docker-entrypoint-initdb.d/
env_file: [ environment/mysql.env, environment/mysql-admin.env ]
networks: [ db ]
deploy:
Expand Down Expand Up @@ -155,9 +156,3 @@ networks:
site:
db:
nginx:




volumes:
database:
5 changes: 5 additions & 0 deletions dmoj/scripts/mariadb/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sudo mariadb
CREATE DATABASE "$MYSQL_DATABASE" DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON "$MYSQL_DATABASE".* TO "$MYSQL_USER"@'localhost' IDENTIFIED BY "$MYSQL_PASSWORD";
exit
mariadb-tzinfo-to-sql /usr/share/zoneinfo | sudo mariadb -u root mysql

0 comments on commit 8227288

Please sign in to comment.