solo是一款开源的个人博客网站
官网的地址:
https://b3log.org/solo/
搭建步骤
没有docker和docker-compose的环境的,可以根据自己的操作系统,准备好对应的环境
version: "2"
services:
mysql:
container_name: mysql
image: mysql:5.7
restart: always
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/init:/docker-entrypoint-initdb.d
- /etc/localtime:/etc/localtime:ro
ports:
- "6603:3306"
environment:
MYSQL_ROOT_PASSWORD: "adminadmin"
TZ: "Asia/Shanghai"
command: --max_allowed_packet=32505856
solo:
container_name: solo
image: b3log/solo:latest
restart: always
ports:
- "8080:8080"
environment:
RUNTIME_DB: "MYSQL"
JDBC_USERNAME: "root"
JDBC_PASSWORD: "adminadmin"
JDBC_DRIVER: "com.mysql.jdbc.Driver"
JDBC_URL: "jdbc:mysql://mysql:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC"
command: --listen_port=8080 --server_port=80 --server_scheme=http --server_host=taotao-java.com
nginx:
container_name: nginx
image: nginx:latest
restart: always
ports:
- "80:80"
volumes:
- "./nginx/conf:/etc/nginx/conf.d"
- "./nginx/www/:/var/www/"
CREATE DATABASE `solo` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
grant all PRIVILEGES on *.* to root@'%' identified by 'adminadmin';
flush privileges;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
server_tokens off;
access_log off;
server {
server_name solo.geexek.com;
listen 80;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://solo:8080;
}
access_log /etc/nginx/conf.d/geexek.com.log;
}
docker-compose -f docker-compose.yml up -d
docker logs -f solo
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/sunyuhua_keyboard/article/details/125258480
内容来源于网络,如有侵权,请联系作者删除!