aganlin
这是 halo的
version: '3'
services:
halo:
image: halohub/halo:1.5.4
hostname: halo
container_name: halo
ports:
- "10.1.0.1:8090:8090"
restart:
always
volumes:
- $PWD/data:/root/.halo
- /etc/localtime:/etc/localtime:ro
environment:
- SERVER_PORT=8090
- SERVER_COMPRESSION_ENABLED=false
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.cj.jdbc.Driver
#- SPRING_DATASOURCE_URL=jdbc:mysql://10.1.0.1:3306/blog_db?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- SPRING_DATASOURCE_URL=${MYSQL_URI}
#- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.h2.Driver
#- SPRING_DATASOURCE_URL=jdbc:h2:file:~/.halo/db/halo
- SPRING_DATASOURCE_USERNAME=${MYSQL_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${MYSQL_PASSWORD}
- HALO_ADMIN_PATH=admin
#- HALO_CACHE=level
#- HALO_CACHE=memory
- HALO_CACHE=redis
- SPRING_REDIS_PORT=${REDIS_PORT}
- SPRING_REDIS_DATABASE=${REDIS_DATABASE}
- SPRING_REDIS_HOST=${REDIS_HOST}
- SPRING_REDIS_PASSWORD=${REDIS_PASSWORD}
#- JVM_XMS=128m
#- JVM_XMX=128m
#- JVM_OPTS=-Xmx128m -Xms128m
这是nginx 的
version: '3'
services:
nginx:
#image: swr.cn-south-1.myhuaweicloud.com/zyy/nginx:0.4-gzip
image: swr.cn-south-1.myhuaweicloud.com/zyy/nginx:0.4-gzip-brotli
#image: nginx:1.18.0
hostname: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
- "10.1.0.1:9913:9913"
restart:
always
volumes:
- $PWD/nginx/conf:/usr/local/nginx/conf
- $PWD/nginx/logs:/usr/local/nginx/logs
- $PWD/nginx/html:/usr/local/nginx/html
这是docker ps
看到的
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
37b96de1bf5f halohub/halo:1.5.4 "/bin/sh -c 'java -X…" 12 days ago Up 12 days 10.1.0.1:8090->8090/tcp halo
e76605dd530c swr.cn-south-1.myhuaweicloud.com/zyy/nginx:0.4-gzip-brotli "supervisord -c /etc…" 3 weeks ago Up 3 weeks 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 10.1.0.1:9913->9913/tcp nginx
53c9b9b23537 redis:5.0.10 "docker-entrypoint.s…" 2 months ago Up 2 months 10.1.0.1:6379->6379/tcp redis
d37602585866 mysql:5.7.34 "docker-entrypoint.s…" 4 months ago Up 2 months 10.1.0.1:3306->3306/tcp, 33060/tcp mysql
nginx 容器是我自己封装的,自己加了一些插件而已,没改变多少