3 Star 3 Fork 7

mochat/docker-compose

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.sample.yml 2.69 KB
一键复制 编辑 原始数据 按行查看 历史
version: '3'
services:
nginx:
image: nginx
container_name: nginx
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
volumes:
- ${NGINX_CONFD_DIR}:/etc/nginx/conf.d/:rw
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf:ro
- ${NGINX_LOG_DIR}:/var/log/nginx/:rw
- ${DASHBOARD_DIR}:/opt/www/dashboard/:rw
- ${SIDEBAR_DIR}:/opt/www/sidebar/:rw
- ${OPERATION_DIR}:/opt/www/operation/:rw
environment:
- TZ=Asia/Shanghai
depends_on:
- backend
- dashboard
- sidebar
- operation
mysql:
image: mysql:5.7
container_name: mysql
ports:
- "${MYSQL_HOST_PORT}:3306"
volumes:
- ${DATA_DIR}/mysql:/var/lib/mysql/:rw
- ${MYSQL_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: "${MO_CHAT_DATABASE}"
TZ: Asia/Shanghai
redis:
image: redis
container_name: redis
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ${REDIS_CONF_FILE}:/etc/redis.conf:ro
- ${DATA_DIR}/redis:/data/:rw
environment:
- TZ=Asia/Shanghai
backend:
build:
context: ./services/php
container_name: backend
ports:
- "${PHP_HYPERF_PORT}:9501"
volumes:
- ${SOURCE_DIR}:/opt/:rw
- ${API_SERVER_DIR}:/opt/www/:rw
- ${PHP_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
environment:
- TZ=Asia/Shanghai
- APP_ENV=${APP_ENV}
cap_add:
- SYS_PTRACE
stdin_open: true
tty: true
depends_on:
- mochat_init
mochat_init:
build:
context: ./services/mochat_init
container_name: mochat_init
volumes:
- ./:/opt/www/docker-compose:rw
- ${API_SERVER_DIR}:/opt/www/api-server:rw
- ${DASHBOARD_DIR}:/opt/www/dashboard/:rw
- ${SIDEBAR_DIR}:/opt/www/sidebar/:rw
- ${OPERATION_DIR}:/opt/www/operation/:rw
restart: on-failure
depends_on:
- mysql
dashboard:
build:
context: ./services/dashboard
container_name: dashboard
volumes:
- ${DASHBOARD_DIR}:/opt/www/:rw
environment:
- TZ=Asia/Shanghai
restart: on-failure
depends_on:
- mochat_init
sidebar:
build:
context: ./services/sidebar
container_name: sidebar
volumes:
- ${SIDEBAR_DIR}:/opt/www/:rw
environment:
- TZ=Asia/Shanghai
restart: on-failure
depends_on:
- mochat_init
operation:
build:
context: ./services/operation
container_name: operation
volumes:
- ${OPERATION_DIR}:/opt/www/:rw
environment:
- TZ=Asia/Shanghai
restart: on-failure
depends_on:
- mochat_init
networks:
default:
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mochat/docker-compose.git
git@gitee.com:mochat/docker-compose.git
mochat
docker-compose
docker-compose
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385