新增wikijs、wiznote的compose示例;新增mariadb、mysql的compose及stack示例;修改部分示例网段
This commit is contained in:
committed by
cloud-init created default user
parent
b73249c50b
commit
00f679a0f6
46
examples/mysql/8/stack/compose.yaml
Normal file
46
examples/mysql/8/stack/compose.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0.37
|
||||
container_name: mysql
|
||||
hostname: mysql
|
||||
restart: always
|
||||
networks:
|
||||
- db_network
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||
- mysql_db:/var/lib/mysql
|
||||
configs:
|
||||
- source: mysql_conf
|
||||
target: /etc/mysql/conf.d/my.cnf
|
||||
mode: 0444
|
||||
secrets:
|
||||
- mysql_root_key
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_key
|
||||
|
||||
volumes:
|
||||
mysql_db:
|
||||
|
||||
configs:
|
||||
mysql_conf:
|
||||
file: my.cnf
|
||||
|
||||
secrets:
|
||||
mysql_root_key:
|
||||
file: root.key
|
||||
|
||||
networks:
|
||||
db_network:
|
||||
name: db_network
|
||||
external: true
|
||||
# driver: bridge
|
||||
# driver_opts:
|
||||
# encrypted: 'true'
|
||||
# ipam:
|
||||
# driver: default
|
||||
# config:
|
||||
# - subnet: 172.21.0.1/24
|
||||
Reference in New Issue
Block a user