commit 317939f46e023fb7745b28a7e4922d9196a50124 Author: leo <426742@gmail.com> Date: Wed Aug 14 10:48:16 2024 +0500 create diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c6639d --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +### mysql +*docker configuration* + + +Start: `sudo docker start mysql` +Start `sudo docker compose -f /data/mysql/docker-compose.yml up -d` + +Stop: `sudo docker stop mysql` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..93529b6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +services: + mariadb: + container_name: mariadb + image: mariadb:lts-ubi9 + restart: always + networks: + - proxynet + env_file: + - /data/secrets/${SERVER_DOMAIN}/${SERVER_DOMAIN}.env + environment: + MARIADB_USER: ${MARIADB_USER} + MARIADB_DATABASE: ${MARIADB_DB} + volumes: + - /data/appdata/mariadb:/var/lib/mysql + labels: + - "traefik.enable=true" + - "traefik.tcp.routers.mariadb.rule=HostSNI(`*`)" + - "traefik.tcp.services.mariadb.loadbalancer.server.port=3306" + - "traefik.tcp.routers.mariadb.entrypoints=mariadb" +networks: + proxynet: + external: true \ No newline at end of file