新增wikijs、wiznote的compose示例;新增mariadb、mysql的compose及stack示例;修改部分示例网段

This commit is contained in:
huty 2024-05-22 09:26:00 +00:00 committed by cloud-init created default user
parent b73249c50b
commit 00f679a0f6
26 changed files with 217 additions and 13 deletions

View File

@ -8,10 +8,11 @@ services:
restart: always
networks:
- db_network
- app_network
ports:
- "8080:8080"
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
networks:
db_network:
@ -23,4 +24,14 @@ networks:
# ipam:
# driver: default
# 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

View File

@ -31,7 +31,7 @@ networks:
# ipam:
# driver: default
# config:
# - subnet: 172.21.0.1/24
# - subnet: 10.21.24.1/24
app_network:
name: app_network
external: true
@ -41,4 +41,4 @@ networks:
# ipam:
# driver: default
# config:
# - subnet: 172.21.0.1/24
# - subnet: 10.21.23.1/24

View File

@ -46,4 +46,4 @@ networks:
# ipam:
# driver: default
# config:
# - subnet: 172.21.0.1/24
# - subnet: 10.21.23.1/24

View File

@ -26,4 +26,4 @@ networks:
# ipam:
# driver: default
# config:
# - subnet: 172.21.0.1/24
# - subnet: 10.21.23.1/24

View 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

View File

@ -11,7 +11,7 @@ services:
ports:
- "3306:3306"
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- mariadb_db:/var/lib/mysql
configs:
- source: mariadb_conf

View File

@ -0,0 +1 @@
5bkyVJsvXuSEZag8xChVXn9GEwHzrmvX

View 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

View File

@ -11,7 +11,7 @@ services:
ports:
- "3306:3306"
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- mysql_db:/var/lib/mysql
configs:
- source: mysql_conf

View File

@ -0,0 +1,4 @@
[mysqld]
max_connections = 1000
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

View File

@ -0,0 +1 @@
6vTWXiZUU5nz7AVCYaCis8GqVF6TZhHH

View 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

View File

@ -0,0 +1,4 @@
[mysqld]
max_connections = 1000
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

View File

@ -11,7 +11,7 @@ services:
ports:
- "3306:3306"
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- mysql_db:/var/lib/mysql
configs:
- source: mysql_conf

View File

@ -0,0 +1,4 @@
[mysqld]
max_connections = 1000
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

View File

@ -0,0 +1 @@
msQijJXzLmeEfmy3j5nQBn7hsVFbd6F3

View File

@ -8,10 +8,11 @@ services:
restart: always
networks:
- db_network
- app_network
ports:
- "80:80"
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
environment:
- PMA_ARBITRARY=1
@ -25,4 +26,14 @@ networks:
# ipam:
# driver: default
# 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

View File

@ -10,7 +10,7 @@ services:
- "9000:9000"
- "9443:9443"
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
@ -27,4 +27,4 @@ networks:
# ipam:
# driver: default
# config:
# - subnet: 172.21.0.1/24
# - subnet: 10.21.22.1/24

View 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

View 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