代码拉取完成,页面将自动刷新
#一键启动
version: "3"
networks:
easyyii:
driver: bridge
services:
# frontend:
# build: ../../frontend
# depends_on:
# - backend
# networks:
# - easyyii
# environment:
# MYSQL_HOST: mariadb
# MYSQL_PORT: 3306
# MYSQL_USERNAME: root
# MYSQL_PASSWORD: easyyiiROOT
# MYSQL_DBNAME: easyyii
# ports:
# - 9091:80
# volumes:
# # Re-use local composer cache via host-volume
# - ~/.composer-docker/cache:/root/.composer/cache:delegated
# # Mount source-code for development
# - ../../:/app
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 50M
# restart: always
backend:
image: yiisoftware/yii2-php:7.4-apache
networks:
- easyyii
ports:
- "9094:80"
- "9097:9200"
volumes:
# Re-use local composer cache via host-volume
- ~/.composer-docker/cache:/root/.composer/cache:delegated
# Mount source-code for development
- ./apache/000-default.conf:/etc/apache2/sites-available/000-default.conf
- ./magento2:/app
- ./shell:/shell
- ./php/base.ini:/usr/local/etc/php/conf.d/base.ini
- ./log/apache:/var/log/apache2
environment:
MYSQL_HOST: mariadb
MYSQL_PORT: 3306
MYSQL_USERNAME: root
MYSQL_PASSWORD: easyyiiROOT
MYSQL_DBNAME: easyyii
mariadb: #数据库
image: mariadb:10.2
volumes:
- ./my.cnf:/etc/mysql/my.cnf
- ./mariadb.cnf:/etc/mysql/mariadb.cnf
- ./data:/var/lib/mysql
networks:
- easyyii
ports:
- "9092:3306"
privileged: true
environment:
MYSQL_ROOT_PASSWORD: easyyiiROOT
TZ: Asia/Shanghai
deploy:
resources:
limits:
cpus: '1'
memory: 256M
restart: always
redis: #缓存
image: redis:latest
networks:
- easyyii
volumes:
- ./redis/redis.conf:/etc/redis/redis.conf
- ./redis/data:/data
privileged: true
deploy:
resources:
limits:
cpus: '1'
memory: 50M
restart: always
# gotools: #初始化工具&健康检测&升级工具
# image: yiisoftware/yii2-php:7.4-apache
# networks:
# - easyyii
# depends_on:
# - mariadb
# volumes:
# - ./shell:/app
# - ./migrators:/app/migrators
# - ../../:/base
# command: /bin/sh -c "sleep 20;/app/initYii/run.sh && tail -f /dev/null"
# environment:
# MYSQL_HOST: mariadb
# MYSQL_PORT: 3306
# MYSQL_USERNAME: root
# MYSQL_PASSWORD: easyyiiROOT
# MYSQL_DBNAME: easyyii
# ports:
# - '9093:80'
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 20M
# restart: always
# gocron: # 定时任务调度
# image: ouqg/gocron
# networks:
# - easyyii
# depends_on:
# - mariadb
# ports:
# - '9095:5920'
# volumes:
# - ./gocron/conf:/app/conf
# - ./logs/gocron:/app/log
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 50M
# restart: always
# scan: # 前端
# image: nginx:latest
# networks:
# - easyyii
# depends_on:
# - gotools
# - backend
# - mariadb
# volumes:
# - ./shell:/app
# - ./nginx/cond:/etc/nginx/conf
# - ./nginx/vhost:/etc/nginx/conf.d
# - ./nginx/dist:/dist
# - ./logs/nginx:/logs
# ports:
# - '9090:80'
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 50M
# restart: always
# nginx: # 统一入口 如果不需要可以注释这一整块,自行配置外层nginx
# image: nginx:latest
# networks:
# - easyyii
# depends_on:
# - gotools
# - backend
# - mariadb
# ports: # 可以修改为 80:80 这将会让服务完全接管所有http正常请求,如果服务器只有这一个服务,请直接改成80:80
# - '9096:80'
# volumes:
# - ./nginx/entrance/cond:/etc/nginx/conf
# - ./nginx/entrance/vhost:/etc/nginx/conf.d
# - ./logs/nginx/entrance/:/logs
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 50M
# restart: always
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。