christianlempa-boilerplates/docker-compose/mariadb/docker-compose.yaml

30 lines
889 B
YAML
Raw Normal View History

2023-05-25 14:26:13 +02:00
---
2023-09-13 12:44:13 +02:00
# (Optional) when using custom network
# networks:
# yournetwork:
# external: true
2022-08-30 10:43:26 +02:00
volumes:
mariadb-data:
2022-08-30 10:35:21 +02:00
services:
mariadb:
2023-12-11 14:57:49 +01:00
# (Recommended) replace "latest" with specific version
2022-08-30 10:35:21 +02:00
image: mariadb:latest
2023-09-13 12:44:13 +02:00
# (Optional) remove this section when you don't want to expose
ports:
- 3306:3306
2022-08-30 10:35:21 +02:00
environment:
2023-09-13 12:44:13 +02:00
# (Optional) remove this section, when using random, or empty root password
- MARIADB_ROOT_PASSWORD=your-root-password
# (Optional) when using random, or empty root password
# - MARIADB_RANDOM_ROOT_PASSWORD=true
# - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true
- MARIADB_DATABASE=your-database
- MARIADB_USER=your-user
- MARIADB_PASSWORD=your-password
2022-08-30 10:35:21 +02:00
volumes:
- mariadb-data:/var/lib/mysql
2023-09-13 12:44:13 +02:00
# (Optional) when using custom network
# networks:
# - yournetwork
restart: unless-stopped