1 Star 0 Fork 2.1K

张有路/OneBlog

forked from yadong.zhang/OneBlog 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 2.12 KB
一键复制 编辑 原始数据 按行查看 历史
yadong.zhang 提交于 2021-10-20 16:52 +08:00 . :memo:docker config
# 通过本地编译的形式运行
# 可以随时修改源代码后 repackage 然后重新构建本地镜像
version: '3.3'
services:
# Redis
blog-redis:
image: redis
restart: always
container_name: blog-redis
hostname: blog-redis
command: redis-server --appendonly yes --requirepass ${ONEBLOG_REDIS_PASSWORD} --bind blog-redis
ports:
- 63799:6379
volumes:
- ${ONEBLOG_APP_DIR}/redis/:/data/
healthcheck:
test: [ "CMD", "redis-cli" ]
timeout: 20s
retries: 10
networks:
- oneblog
# MySQL
blog-mysql:
image: justauth/blog-mysql
build: ./mysql
environment:
MYSQL_ROOT_PASSWORD: ${ONEBLOG_DATASOURCE_PASSWORD}
TZ: Asia/Shanghai
restart: always
container_name: blog-mysql
hostname: blog-mysql
volumes:
- ${ONEBLOG_APP_DIR}/mysql:/var/lib/mysql
ports:
- 33066:3306
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
networks:
- oneblog
# admin 服务
blog-admin:
image: justauth/blog-admin
build: ../../blog-admin
restart: always
container_name: blog-admin
hostname: blog-admin
env_file:
- .env
volumes:
- ${ONEBLOG_APP_DIR}:/var/tmp/oneblog
depends_on:
blog-redis:
condition: service_healthy
blog-mysql:
condition: service_healthy
links:
- blog-redis
- blog-mysql
ports:
- 8085:8085
networks:
- oneblog
# admin 服务
blog-web:
image: justauth/blog-web
build: ../../blog-web
restart: always
container_name: blog-web
hostname: blog-web
env_file:
- .env
volumes:
- ${ONEBLOG_APP_DIR}:/var/tmp/oneblog
depends_on:
blog-redis:
condition: service_healthy
blog-mysql:
condition: service_healthy
links:
- blog-redis
- blog-mysql
ports:
- 8443:8443
networks:
- oneblog
networks:
oneblog:
driver: bridge
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/coderzcr/DBlog.git
git@gitee.com:coderzcr/DBlog.git
coderzcr
DBlog
OneBlog
master

搜索帮助