docker安装octobercms

资源准备:

安装步骤:

  1. docker版的composer, 将其仓库地址替换为中国. Dockerfile tip: docker build -t mycomposer .
  2. mkdir ~/laradockProject
  3. cd ~/laradockProject
  4. git clone https://github.com/laradock/laradock.git
  5. cd ~/laradockProject/laradock
  6. cp env-exampl .env
  7. vi .env PP_CODE_PATH_HOST=../myoctober MYSQL_VERSION=5.7
  8. docker-compose build mysql
  9. cd ~/laradockProject/laradock/nginx/sites
  10. cp laravel.conf.example myoctober.conf
  11. vi myoctober.conf server_name myoctober.test; root /var/www;
  12. docker-compose up -d nginx mysql phpmyadmin redis workspace
  13. docker-exec -it laradock_mysql_1 bash
  14. mysql -u root -p root | create database myoctober
  15. 退出数据库, 退出mysql-docker
  16. sudo vi /etc/hosts | add 127.0.0.1 myoctober.test
  17. docker run --rm --interactive --tty --volume $PWD:/app mycomposer create-project october/october myoctober
  18. vi ~/laradockProject/myoctober/config/cms.php ‘disableCoreUpdates’ => true,
  19. cd ~/laradockProject/myoctober
  20. docker run –rm –interactive –tty –volume $PWD:/app mycomposer update
  21. vi ~/laradockProject/myoctober/config/database.php 设置数据库配置信息(user: root pass:root)
  22. 前台: http://myoctober.test 后台: http://myoctober.test/backend/backend/auth/signin 默认用户名: admin 密码: admin

相关资料

composer-安装
官方安装文档-composer
docker-mysql启动错误