From 03e071b502c746e2c3b4ee54a4d47bfad2cfc7dc Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Fri, 19 Sep 2025 13:05:45 +0800 Subject: [PATCH] v.0 202509191305 --- .env.example | 8 ++++++++ .gitattributes | 15 +++++++++++++++ .gitignore | 4 ++++ docker-compose.yml | 27 +++++++++++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 .env.example create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4edbfca --- /dev/null +++ b/.env.example @@ -0,0 +1,8 @@ +MariaDB_NODE_NAME=SVR +MARIADB_ROOT_PASSWORD=rootpass +MariaDB_GALERA_CLUSTER_ADDRESS=gcomm://192.168.1.200 +MARIADB_GALERA_CLUSTER_NAME=ktv_mariadb_cluster +MARIADB_GALERA_MARIABACKUP_PASSWORD=7BYfrgCw4vmj9vaHZLED +MariaDB_GALERA_BOOTSTRAP=yes + +PHPMYADMIN_PORT=8080 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7f300e2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +# 所有 Shell 腳本用 LF +*.sh text eol=lf + +# Docker 設定與腳本 +Dockerfile text eol=lf +*.yaml text eol=lf +*.yml text eol=lf + +# Laravel & PHP 設定檔 +*.conf text eol=lf +*.ini text eol=lf +.env* text eol=lf + +# 其他你專案內的自定義目錄內腳本 +docker/** text eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fef95d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +data +*.cnf +.env +.DS_Store \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c13a4f6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +services: + mariadb-galera: + image: bitnami/mariadb-galera:latest + container_name: ${MariaDB_NODE_NAME} + environment: + - MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD} + - MARIADB_GALERA_CLUSTER_BOOTSTRAP=${MariaDB_GALERA_BOOTSTRAP} + - MARIADB_GALERA_CLUSTER_NAME=${MARIADB_GALERA_CLUSTER_NAME} + - MARIADB_GALERA_MARIABACKUP_PASSWORD=${MARIADB_GALERA_MARIABACKUP_PASSWORD} + ports: + - "3306:3306" + - "4444:4444" + - "4567:4567" + - "4567:4567/udp" + - "4568:4568" + volumes: + phpmyadmin: + image: phpmyadmin/phpmyadmin:latest + container_name: phpmyadmin + environment: + - PMA_HOST=mariadb-galera + - PMA_USER=root + - PMA_PASSWORD=${MARIADB_ROOT_PASSWORD} + ports: + - "${PHPMYADMIN_PORT}:80" + depends_on: + - mariadb-galera \ No newline at end of file