Skip to content

Instantly share code, notes, and snippets.

@supanadit
Created June 28, 2025 03:22
Show Gist options
  • Select an option

  • Save supanadit/4c6c0c0b0be71f7b19c01615551c785d to your computer and use it in GitHub Desktop.

Select an option

Save supanadit/4c6c0c0b0be71f7b19c01615551c785d to your computer and use it in GitHub Desktop.
networks:
default:
name: pratama-network
external: true
services:
mariadb:
image: "bitnami/mariadb:10.8"
restart: always
environment:
- MARIADB_ROOT_PASSWORD=secret
- BITNAMI_DEBUG=false
labels:
# This is how you route TCP in Traefik
- "traefik.enable=true"
- "traefik.tcp.routers.mysql-tcp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mysql-tcp.entrypoints=mysql"
- "traefik.tcp.routers.mysql-tcp.service=mysql-svc"
- "traefik.tcp.services.mysql-svc.loadbalancer.server.port=3306"
volumes:
- ./.data:/bitnami/mariadb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment