首先,我来介绍下,这个webstack导航网站实际上是被做成了wordpress的一个主题,具体这个主题的下载地址如下:
我选择使用了docker进行搭建,方便管理也易于操作。先把需要用的镜像拉取下来:
docker pull wordpress:latest docker pull mysql:5.7
然后编写docker-compose.yml文件,如下所示:
version: "3" services: navigation_website: image: wordpress:latest container_name: website restart: always ports: - "8082:80" networks: - lingjianhua_network depends_on: - mysql # command: php artisan key:generate mysql: image: mysql:5.7 container_name: mysql restart: always environment: MYSQL_ROOT_PASSWORD: 56167823 MYSQL_ALLOW_WMPTY_PASSWORD: 'no' MYSQL_DATABASE: 'website' MYSQL_USER: 'timtian' MYSQL_PASSWORD: 56167823 ports: - "33066:3306" volumes: - /app/mysql/db:/var/libmysql5.7 - /app/mysql/conf/my.cnf:/etc/mysql5.7/my.cnf - /app/mysql/init:/mysql5.7/docker-entrypoint-initdb.d - /home/mysql/log:/var/log/mysql networks: - lingjianhua_network #command: --default-authentication-pugin=mysql_native_password nginx: image: nginx:latest container_name: nginx443 restart: always ports: - "443:443" - "80:80" volumes: - /home/nginx/conf/conf.d:/etc/nginx/conf.d - /home/nginx/html:/usr/share/nginx/html - /home/nginx/log:/var/log/nginx - /home/nginx/conf/nginx.conf:/etc/nginx/nginx.conf networks: - lingjianhua_network networks: lingjianhua_network:
一共三个容器,nginx,wordpress站点还有就是mysql。运行命令
docker-compose up -d
即可。接着在后台页面->主题->上传主题->安装主题。按着步骤操作即可。
这是nginx配置的问题,需要在nginx.conf文件的http或者server中添加client_max_body_size:20M选项,意思是POST最大文件大小为20M,这样基本就不会超出提交大小了。
这是最终的效果,欢迎大家访问!!!
目前,就是这么多。
END
原文链接:https://blog.csdn.net/qq_41938259/article/details/131557528?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168994567316782427435997%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=168994567316782427435997&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-1-131557528-null-null.268%5Ev1%5Ekoosearch&utm_term=docker%E3%80%81wordpress%E3%80%81wordpress%E5%BB%BA%E7%AB%99%E3%80%81wordpress%E4%B8%BB%E9%A2%98%E3%80%81%E5%AE%B9%E5%99%A8%E9%95%9C%E5%83%8F%E3%80%81