docker-compose-mariadb.yaml
· 601 B · YAML
Неформатований
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
| 1 | networks: |
| 2 | default: |
| 3 | name: pratama-network |
| 4 | external: true |
| 5 | |
| 6 | services: |
| 7 | mariadb: |
| 8 | image: "bitnami/mariadb:10.8" |
| 9 | restart: always |
| 10 | environment: |
| 11 | - MARIADB_ROOT_PASSWORD=secret |
| 12 | - BITNAMI_DEBUG=false |
| 13 | labels: |
| 14 | # This is how you route TCP in Traefik |
| 15 | - "traefik.enable=true" |
| 16 | - "traefik.tcp.routers.mysql-tcp.rule=HostSNI(`*`)" |
| 17 | - "traefik.tcp.routers.mysql-tcp.entrypoints=mysql" |
| 18 | - "traefik.tcp.routers.mysql-tcp.service=mysql-svc" |
| 19 | - "traefik.tcp.services.mysql-svc.loadbalancer.server.port=3306" |
| 20 | volumes: |
| 21 | - ./.data:/bitnami/mariadb |