diff --git a/examples/adminer/compose.yaml b/examples/adminer/compose.yaml index a59772e..2aba8a7 100644 --- a/examples/adminer/compose.yaml +++ b/examples/adminer/compose.yaml @@ -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 diff --git a/examples/caddy/compose.yaml b/examples/caddy/compose.yaml index 7820f12..0bcdc8f 100644 --- a/examples/caddy/compose.yaml +++ b/examples/caddy/compose.yaml @@ -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 diff --git a/examples/drawio/compose.yaml b/examples/drawio/compose.yaml index ecf1aa7..7544464 100644 --- a/examples/drawio/compose.yaml +++ b/examples/drawio/compose.yaml @@ -46,4 +46,4 @@ networks: # ipam: # driver: default # config: -# - subnet: 172.21.0.1/24 +# - subnet: 10.21.23.1/24 diff --git a/examples/filebrowser/compose.yaml b/examples/filebrowser/compose.yaml index aa9addd..1a71b1c 100644 --- a/examples/filebrowser/compose.yaml +++ b/examples/filebrowser/compose.yaml @@ -26,4 +26,4 @@ networks: # ipam: # driver: default # config: -# - subnet: 172.21.0.1/24 +# - subnet: 10.21.23.1/24 diff --git a/examples/mariadb/10/compose/compose.yaml b/examples/mariadb/10/compose/compose.yaml new file mode 100644 index 0000000..50c584b --- /dev/null +++ b/examples/mariadb/10/compose/compose.yaml @@ -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 diff --git a/examples/mariadb/10/my.cnf b/examples/mariadb/10/compose/conf/my.cnf similarity index 100% rename from examples/mariadb/10/my.cnf rename to examples/mariadb/10/compose/conf/my.cnf diff --git a/examples/mariadb/10/root.key b/examples/mariadb/10/compose/conf/root.key similarity index 100% rename from examples/mariadb/10/root.key rename to examples/mariadb/10/compose/conf/root.key diff --git a/examples/mariadb/10/compose.yaml b/examples/mariadb/10/stack/compose.yaml similarity index 92% rename from examples/mariadb/10/compose.yaml rename to examples/mariadb/10/stack/compose.yaml index 8d9c1cb..cc5755e 100644 --- a/examples/mariadb/10/compose.yaml +++ b/examples/mariadb/10/stack/compose.yaml @@ -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 diff --git a/examples/mysql/5/my.cnf b/examples/mariadb/10/stack/my.cnf similarity index 100% rename from examples/mysql/5/my.cnf rename to examples/mariadb/10/stack/my.cnf diff --git a/examples/mariadb/10/stack/root.key b/examples/mariadb/10/stack/root.key new file mode 100644 index 0000000..37ddc91 --- /dev/null +++ b/examples/mariadb/10/stack/root.key @@ -0,0 +1 @@ +5bkyVJsvXuSEZag8xChVXn9GEwHzrmvX diff --git a/examples/mysql/5/compose/compose.yaml b/examples/mysql/5/compose/compose.yaml new file mode 100644 index 0000000..b9c0ab5 --- /dev/null +++ b/examples/mysql/5/compose/compose.yaml @@ -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 diff --git a/examples/mysql/8/my.cnf b/examples/mysql/5/compose/conf/my.cnf similarity index 100% rename from examples/mysql/8/my.cnf rename to examples/mysql/5/compose/conf/my.cnf diff --git a/examples/mysql/5/root.key b/examples/mysql/5/compose/conf/root.key similarity index 100% rename from examples/mysql/5/root.key rename to examples/mysql/5/compose/conf/root.key diff --git a/examples/mysql/5/compose.yaml b/examples/mysql/5/stack/compose.yaml similarity index 92% rename from examples/mysql/5/compose.yaml rename to examples/mysql/5/stack/compose.yaml index 5198af8..0216994 100644 --- a/examples/mysql/5/compose.yaml +++ b/examples/mysql/5/stack/compose.yaml @@ -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 diff --git a/examples/mysql/5/stack/my.cnf b/examples/mysql/5/stack/my.cnf new file mode 100644 index 0000000..ac541ff --- /dev/null +++ b/examples/mysql/5/stack/my.cnf @@ -0,0 +1,4 @@ +[mysqld] +max_connections = 1000 +character-set-server = utf8mb4 +collation-server = utf8mb4_unicode_ci diff --git a/examples/mysql/5/stack/root.key b/examples/mysql/5/stack/root.key new file mode 100644 index 0000000..5a1bb41 --- /dev/null +++ b/examples/mysql/5/stack/root.key @@ -0,0 +1 @@ +6vTWXiZUU5nz7AVCYaCis8GqVF6TZhHH diff --git a/examples/mysql/8/compose/compose.yaml b/examples/mysql/8/compose/compose.yaml new file mode 100644 index 0000000..a477c87 --- /dev/null +++ b/examples/mysql/8/compose/compose.yaml @@ -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 diff --git a/examples/mysql/8/compose/conf/my.cnf b/examples/mysql/8/compose/conf/my.cnf new file mode 100644 index 0000000..ac541ff --- /dev/null +++ b/examples/mysql/8/compose/conf/my.cnf @@ -0,0 +1,4 @@ +[mysqld] +max_connections = 1000 +character-set-server = utf8mb4 +collation-server = utf8mb4_unicode_ci diff --git a/examples/mysql/8/root.key b/examples/mysql/8/compose/conf/root.key similarity index 100% rename from examples/mysql/8/root.key rename to examples/mysql/8/compose/conf/root.key diff --git a/examples/mysql/8/compose.yaml b/examples/mysql/8/stack/compose.yaml similarity index 92% rename from examples/mysql/8/compose.yaml rename to examples/mysql/8/stack/compose.yaml index bed51a9..2447dd2 100644 --- a/examples/mysql/8/compose.yaml +++ b/examples/mysql/8/stack/compose.yaml @@ -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 diff --git a/examples/mysql/8/stack/my.cnf b/examples/mysql/8/stack/my.cnf new file mode 100644 index 0000000..ac541ff --- /dev/null +++ b/examples/mysql/8/stack/my.cnf @@ -0,0 +1,4 @@ +[mysqld] +max_connections = 1000 +character-set-server = utf8mb4 +collation-server = utf8mb4_unicode_ci diff --git a/examples/mysql/8/stack/root.key b/examples/mysql/8/stack/root.key new file mode 100644 index 0000000..bffe010 --- /dev/null +++ b/examples/mysql/8/stack/root.key @@ -0,0 +1 @@ +msQijJXzLmeEfmy3j5nQBn7hsVFbd6F3 diff --git a/examples/phpmyadmin/compose.yaml b/examples/phpmyadmin/compose.yaml index a5c5e82..69cfced 100644 --- a/examples/phpmyadmin/compose.yaml +++ b/examples/phpmyadmin/compose.yaml @@ -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 diff --git a/examples/portainer/compose.yaml b/examples/portainer/compose.yaml index 190fb40..bf09497 100644 --- a/examples/portainer/compose.yaml +++ b/examples/portainer/compose.yaml @@ -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 diff --git a/examples/wikijs/compose.yaml b/examples/wikijs/compose.yaml new file mode 100644 index 0000000..ac6f2a7 --- /dev/null +++ b/examples/wikijs/compose.yaml @@ -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 diff --git a/examples/wiznote/compose.yaml b/examples/wiznote/compose.yaml new file mode 100644 index 0000000..ac2cc4b --- /dev/null +++ b/examples/wiznote/compose.yaml @@ -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