新增wikijs、wiznote的compose示例;新增mariadb、mysql的compose及stack示例;修改部分示例网段
This commit is contained in:
parent
b73249c50b
commit
00f679a0f6
@ -8,10 +8,11 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- db_network
|
- db_network
|
||||||
|
- app_network
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
db_network:
|
db_network:
|
||||||
@ -23,4 +24,14 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.22.1/24
|
||||||
|
app_network:
|
||||||
|
name: app_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.23.1/24
|
||||||
|
@ -31,7 +31,7 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.24.1/24
|
||||||
app_network:
|
app_network:
|
||||||
name: app_network
|
name: app_network
|
||||||
external: true
|
external: true
|
||||||
@ -41,4 +41,4 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.23.1/24
|
||||||
|
@ -46,4 +46,4 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.23.1/24
|
||||||
|
@ -26,4 +26,4 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.23.1/24
|
||||||
|
31
examples/mariadb/10/compose/compose.yaml
Normal file
31
examples/mariadb/10/compose/compose.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
image: mariadb:10.11.7
|
||||||
|
container_name: mariadb
|
||||||
|
hostname: mariadb
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- db_network
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
|
- ./data:/var/lib/mysql
|
||||||
|
- ./conf/my.cnf:/etc/mysql/conf.d/my.cnf
|
||||||
|
- ./conf/root.key:/etc/mysql/conf.d/root.key
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD_FILE=/etc/mysql/conf.d/root.key
|
||||||
|
|
||||||
|
networks:
|
||||||
|
db_network:
|
||||||
|
name: db_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.22.1/24
|
@ -11,7 +11,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
- mariadb_db:/var/lib/mysql
|
- mariadb_db:/var/lib/mysql
|
||||||
configs:
|
configs:
|
||||||
- source: mariadb_conf
|
- source: mariadb_conf
|
1
examples/mariadb/10/stack/root.key
Normal file
1
examples/mariadb/10/stack/root.key
Normal file
@ -0,0 +1 @@
|
|||||||
|
5bkyVJsvXuSEZag8xChVXn9GEwHzrmvX
|
31
examples/mysql/5/compose/compose.yaml
Normal file
31
examples/mysql/5/compose/compose.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:5.7.44
|
||||||
|
container_name: mysql
|
||||||
|
hostname: mysql
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- db_network
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
|
- ./data:/var/lib/mysql
|
||||||
|
- ./conf/my.cnf:/etc/mysql/conf.d/my.cnf
|
||||||
|
- ./conf/root.key:/etc/mysql/conf.d/root.key
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD_FILE=/etc/mysql/conf.d/root.key
|
||||||
|
|
||||||
|
networks:
|
||||||
|
db_network:
|
||||||
|
name: db_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.22.1/24
|
@ -11,7 +11,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
- mysql_db:/var/lib/mysql
|
- mysql_db:/var/lib/mysql
|
||||||
configs:
|
configs:
|
||||||
- source: mysql_conf
|
- source: mysql_conf
|
4
examples/mysql/5/stack/my.cnf
Normal file
4
examples/mysql/5/stack/my.cnf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[mysqld]
|
||||||
|
max_connections = 1000
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server = utf8mb4_unicode_ci
|
1
examples/mysql/5/stack/root.key
Normal file
1
examples/mysql/5/stack/root.key
Normal file
@ -0,0 +1 @@
|
|||||||
|
6vTWXiZUU5nz7AVCYaCis8GqVF6TZhHH
|
31
examples/mysql/8/compose/compose.yaml
Normal file
31
examples/mysql/8/compose/compose.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
|
- ./data:/var/lib/mysql
|
||||||
|
- ./conf/my.cnf:/etc/mysql/conf.d/my.cnf
|
||||||
|
- ./conf/root.key:/etc/mysql/conf.d/root.key
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD_FILE=/etc/mysql/conf.d/root.key
|
||||||
|
|
||||||
|
networks:
|
||||||
|
db_network:
|
||||||
|
name: db_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.22.1/24
|
4
examples/mysql/8/compose/conf/my.cnf
Normal file
4
examples/mysql/8/compose/conf/my.cnf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[mysqld]
|
||||||
|
max_connections = 1000
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server = utf8mb4_unicode_ci
|
@ -11,7 +11,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
- mysql_db:/var/lib/mysql
|
- mysql_db:/var/lib/mysql
|
||||||
configs:
|
configs:
|
||||||
- source: mysql_conf
|
- source: mysql_conf
|
4
examples/mysql/8/stack/my.cnf
Normal file
4
examples/mysql/8/stack/my.cnf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[mysqld]
|
||||||
|
max_connections = 1000
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server = utf8mb4_unicode_ci
|
1
examples/mysql/8/stack/root.key
Normal file
1
examples/mysql/8/stack/root.key
Normal file
@ -0,0 +1 @@
|
|||||||
|
msQijJXzLmeEfmy3j5nQBn7hsVFbd6F3
|
@ -8,10 +8,11 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- db_network
|
- db_network
|
||||||
|
- app_network
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
- PMA_ARBITRARY=1
|
- PMA_ARBITRARY=1
|
||||||
|
|
||||||
@ -25,4 +26,14 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.22.1/24
|
||||||
|
app_network:
|
||||||
|
name: app_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.23.1/24
|
||||||
|
@ -10,7 +10,7 @@ services:
|
|||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
- "9443:9443"
|
- "9443:9443"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- portainer_data:/data
|
- portainer_data:/data
|
||||||
|
|
||||||
@ -27,4 +27,4 @@ networks:
|
|||||||
# ipam:
|
# ipam:
|
||||||
# driver: default
|
# driver: default
|
||||||
# config:
|
# config:
|
||||||
# - subnet: 172.21.0.1/24
|
# - subnet: 10.21.22.1/24
|
||||||
|
44
examples/wikijs/compose.yaml
Normal file
44
examples/wikijs/compose.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
wikijs:
|
||||||
|
image: requarks/wiki:2.5.302
|
||||||
|
container_name: wikijs
|
||||||
|
hostname: wikijs
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- app_network
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
|
- wikijs_data:/wiki/data
|
||||||
|
- wikijs_backup:/backup
|
||||||
|
# 使用 sqlite 数据库时需要指定
|
||||||
|
- wikijs_db:/sqlite/data
|
||||||
|
environment:
|
||||||
|
- DB_TYPE="sqlite"
|
||||||
|
- DB_FILEPATH="/sqlite/data/wikijs.db"
|
||||||
|
# - DB_TYPE="mysql"
|
||||||
|
# - DB_HOST="hty1024-db-mysql-service.hty1024-db"
|
||||||
|
# - DB_PORT="3306"
|
||||||
|
# - DB_USER="wikijs"
|
||||||
|
# - DB_PASS="123456"
|
||||||
|
# - DB_NAME="wikijs"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
wikijs_data:
|
||||||
|
wikijs_backup:
|
||||||
|
wikijs_db:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app_network:
|
||||||
|
name: app_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.22.1/24
|
30
examples/wiznote/compose.yaml
Normal file
30
examples/wiznote/compose.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
wiznote:
|
||||||
|
image: hub.hty1024.com/official/wiznote/wizserver:1.0.31
|
||||||
|
container_name: wiznote
|
||||||
|
hostname: wiznote
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- app_network
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||||||
|
- wiznote_data:/wiz/storage
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
wiznote_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app_network:
|
||||||
|
name: app_network
|
||||||
|
external: true
|
||||||
|
# driver: bridge
|
||||||
|
# driver_opts:
|
||||||
|
# encrypted: 'true'
|
||||||
|
# ipam:
|
||||||
|
# driver: default
|
||||||
|
# config:
|
||||||
|
# - subnet: 10.21.22.1/24
|
Loading…
Reference in New Issue
Block a user