群晖docker安装1panel教程并配置mysql和openresty，并用docker compose安装Typecho
用docker安装安装1panel教程并配置mysql和openresty1,确保群晖已经安装docker2，安装 1Panel选的官方的ssh安装方式，使用SSH工具登录，确保root登录，假如不是，在命令行输入sudo -i然后拷贝下边命令安装并运行1panelcurl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sh quick_start.sh3，登录1panel安装成功后，控制台会打印面板访问信息，可通过浏览器访问 1Panel：http://目标服务器 IP 地址:目标端口/安全入口执行 1pctl user-info 命令可获取安全入口（entrance）1panel user-info官方地址：https://1panel.cn/docs/installation/online_installation/4，登录1panel配置mysql先创建mysql的docker-compose.yml在电脑本地创建docker-compose.yml，填入以下内容，保存networks: 1panel-network: external: true services: mysql: command: - --mysql-native-password=on container_name: ${CONTAINER_NAME} deploy: resources: limits: cpus: ${CPUS} memory: ${MEMORY_LIMIT} environment: MYSQL_ROOT_PASSWORD: ${PANEL_DB_ROOT_PASSWORD} # MySQL root 密码 TZ: Asia/Shanghai # 时区设置（直接合并到这里） image: mysql:8.4.5 labels: createdBy: Apps networks: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:3306 restart: always volumes: - /volume1/docker/1panel/1panel/apps/mysql/mysql/data/:/var/lib/mysql - /volume1/docker/1panel/1panel/apps/mysql/mysql/conf/my.cnf:/etc/my.cnf - /volume1/docker/1panel/1panel/apps/mysql/mysql/log:/var/log/mysql 进入群晖的docker/1panel/1panel/apps/文件夹，创建mysql/mysql/data文件夹，创建mysql/mysql/conf/my.cnf文件，创建mysql/mysql/log文件，并在/volume1/docker/1panel/1panel/apps/mysql/mysql文件夹并上传刚刚创建的docker-compose.yml选择左侧菜单「容器」->「编排」>「创建编排」，来源那里选择路径选择，输入docker-compose.yml的路径/volume1/docker/1panel/1panel/apps/mysql/mysql/docker-compose.yml 内容，点击“确认”按钮等待部署完成即可。参考地址：https://blog.irec.moe/install_1panel_with_synology_docker.html5，配置openresty方法类似mysqldocker-compose.ymlservices: openresty: image: 1panel/openresty:1.21.4.3-3-3-focal container_name: ${CONTAINER_NAME} restart: always network_mode: host volumes: - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/fastcgi_params:/usr/local/openresty/nginx/conf/fastcgi_params - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/fastcgi-php.conf:/usr/local/openresty/nginx/conf/fastcgi-php.conf - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/mime.types:/usr/local/openresty/nginx/conf/mime.types - /volume1/docker/1panel/1panel/apps/openresty/openresty/logs/nginx:/var/log/nginx - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/conf.d:/usr/local/openresty/nginx/conf/conf.d/ - /volume1/docker/1panel/1panel/apps/openresty/openresty/www:/www - /volume1/docker/1panel/1panel/apps/openresty/openresty/root:/usr/share/nginx/html - /volume1/docker/1panel/1panel/apps/openresty/openresty/1pwaf/data:/usr/local/openresty/1pwaf/data environment: TZ: Asia/Shanghai labels: createdBy: "Apps"用docker安装Typecho方式1：使用 docker run$ docker run --name typecho-server -e TYPECHO_SITE_URL=https://your-domain.com -d joyqi/typecho:nightly-php7.4-apache方式2：使用 docker composeversion: '3.7' services: typecho: image: joyqi/typecho:nightly-php7.4-apache container_name: typecho-server restart: always environment: - TYPECHO_SITE_URL=https://your-domain.com ports: - 8080:80 volumes: - /var/typecho:/app/usr1,替换 your-domain.com 为你的域名。2,Port 8080 只是示例端口，修改为你需要映射的端口3,/var/typecho 是你的 Typecho 数据目录，你可以使用任何你喜欢的目录，但请确保目录存在且可写。官方文档：https://docs.typecho.re/usage/install/docker.html注意：需要配置数据库，可以在1panel里的my-sql里配置你的数量库，数据库地址是：yourIP地址(docker宿主的ip地址):3306,用户名和密码是你设置的