Open qiaofeng1227 opened 6 months ago
composer create-project --prefer-dist laravel/laravel myapp
cd myapp && php artisan serve --host=0.0.0.0 --port=8080
Laravel FrameWork project have not 【Laravel package】in source. It installed by two way:
1, example project: https://github.com/akaunting/akaunting
git clone https://github.com/akaunting/akaunting.git
composer install
2, example project: https://github.com/octobercms/october
composer create-project october/october myoctober
They are install 【Laravel package】by composer.json, it will make new folders "vendor"
version: '3.8'
services:
laravel:
image: laravelfans/laravel:latest
container_name: laravel
restart: unless-stopped
ports:
- '8000:80'
environment:
- APP_KEY=base64:L+3avOYCfuq8nnDpHs74+5Et3sx27TssucHQIyqfpDY=
- APP_ENV=local
- DB_CONNECTION=sqlite
volumes:
- 'data:/var/www/laravel'
networks:
default:
name: websoft9
external: true
volumes:
data:
进入laravel容器创建新项目:
root@ec2006a20b46:/var/www# composer create-project october/october myoctober
...
Generating autoload files
> System\Console\ComposerScript::postAutoloadDump
96 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> System\Console\ComposerScript::postUpdateCmd
No security vulnerability advisories found.
> @php artisan key:generate --ansi
Unable to set application key. No APP_KEY variable was found in the .env file.
myoctober 创建后并没有public文件夹
https://docs.octobercms.com/3.x/setup/installation.html
我申请的key:WG6ZO-YR5K1-EWY00-PUFKC
laravelfans/laravel容器本身有APP_KEY这个环境变量,如果把它设置在docker-compose.yml中,它优先级最高。对容器内的环境变量有影响,将APP_KEY这个环境变量注释掉就不会报错了。
What type of your feature request?