This commit is contained in:
leo 2024-08-14 10:48:16 +05:00
commit 317939f46e
2 changed files with 30 additions and 0 deletions

8
README.md Normal file
View File

@ -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`

22
docker-compose.yml Normal file
View File

@ -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