Mosasauroidea / GazellePW

Movie-based Gazelle
MIT License
247 stars 57 forks source link

Docker compose up 无法启动 #2

Closed xiaomlove closed 2 years ago

xiaomlove commented 2 years ago

docker build 无错误,docker compose up 有错误。

gpw-web         | [3/4] Linking dependencies...
gpw-web         | warning " > @mdx-js/rollup@2.0.0" has unmet peer dependency "rollup@>=2".
gpw-web         | warning " > @preact/preset-vite@2.1.7" has unmet peer dependency "@babel/core@7.x".
gpw-web         | warning "@preact/preset-vite > @babel/plugin-transform-react-jsx@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0".
gpw-web         | warning "@preact/preset-vite > babel-plugin-transform-hook-names@1.0.2" has unmet peer dependency "@babel/core@^7.12.10".
gpw-web         | warning "@preact/preset-vite > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0".
gpw-web         | warning "alias-hq > jscodeshift@0.10.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
gpw-web         | warning "eslint-plugin-jest > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
gpw-web         | warning " > postcss-dark-theme-class@0.7.3" has unmet peer dependency "postcss@^8.2.14".
gpw-sphinxsearch | Still waiting for Web (Count: 20).
gpw-web         | [4/4] Building fresh packages...
gpw-sphinxsearch | Still waiting for Web (Count: 40).
gpw-web         | Done in 48.42s.
gpw-web         | 
gpw-web         | ====== Yarn Start ======
gpw-web         | GENERATING GAZELLE CONFIG...
gpw-web         | 
gpw-web         | 
gpw-web         | Run migrations...
gpw-web         | /var/www/.docker/web/entrypoint.sh: line 36: /var/www/vendor/bin/phinx: No such file or directory
gpw-web         | PHINX FAILED TO RUN MIGRATIONS
gpw-web exited with code 1
gpw-sphinxsearch | Still waiting for Web (Count: 60).
gpw-sphinxsearch | Still waiting for Web (Count: 80).
gpw-sphinxsearch | Still waiting for Web (Count: 100).
120318 commented 2 years ago

看起来是composer install没有成功,检查下composer和vendor目录的情况。 或者提供下 gpw-web 再之前的日志。

xiaomlove commented 2 years ago
gpw-web         | ====== Composer Install ======
gpw-web         | Composer 1.8.4 2019-02-11 10:52:10
gpw-web         | Loading composer repositories with package information
gpw-web         | Installing dependencies (including require-dev) from lock file
gpw-web         | Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
gpw-web         | Package operations: 86 installs, 0 updates, 0 removals
gpw-web         | 
gpw-web         | In Filesystem.php line 186:
gpw-web         |                                                             
gpw-web         |   /var/www/vendor does not exist and could not be created.  
gpw-web         |                                                             
gpw-web         | 
gpw-web         | install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
gpw-web         | 
gpw-web         | 
gpw-web         | ====== Yarn Install ======
gpw-web         | yarn install v1.22.19
gpw-web         | [1/4] Resolving packages...
gpw-web         | success Already up-to-date.
gpw-web         | Done in 0.71s.
gpw-web         | 
gpw-web         | ====== Yarn Start ======
gpw-web         | /var/www/.docker/web/entrypoint.sh: line 36: /var/www/vendor/bin/phinx: No such file or directory
gpw-web         | Run migrations...
gpw-web         | PHINX FAILED TO RUN MIGRATIONS
gpw-web exited with code 1
120318 commented 2 years ago

是不是有对项目里的vendor目录做了调整, 看看你项目目录里的vendor目录权限,可能是vendor权限造成的? 可以删除vendor目录重新启动试试

xiaomlove commented 2 years ago

什么都没有改动。删除全部镜像,重启 docker,重新 build,还是不行,连 Mysql 都不行了。。。

gpw-mysql       | 2022-06-04  5:53:06 43 [Warning] Access denied for user 'gazelle'@'172.20.0.5' (using password: YES)
120318 commented 2 years ago

操作系统是?

xiaomlove commented 2 years ago

[root@mail ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@mail ~]# docker -v Docker version 20.10.14, build a224086 [root@mail ~]# docker-compose -v docker-compose version 1.29.2, build 5becea4c

120318 commented 2 years ago

composer权限问题导致。

chmod -R 777 <你的项目目录> 或者不要使用 root 用户。