Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complete docker-compose.yml for [Laravel] #614

Open
15 tasks
qiaofeng1227 opened this issue May 17, 2024 · 7 comments
Open
15 tasks

complete docker-compose.yml for [Laravel] #614

qiaofeng1227 opened this issue May 17, 2024 · 7 comments
Assignees
Labels
feature Type label, New feature or request

Comments

@qiaofeng1227
Copy link
Contributor

What type of your feature request?

  • official architecture research
  • test offcial docker
  • complete standardized expression
  • developer test and running
  • specials and refers at notes.md/.env/docker-compose.yml
  • contentful
  • test at Appstore and nginx proxy testing
  • docs
  • siteurl or baseurl
  • more environments from
  • connetion URI
  • ports
  • credentials environment
  • i18n
  • other
@qiaofeng1227 qiaofeng1227 added the feature Type label, New feature or request label May 17, 2024
@qiaofeng1227 qiaofeng1227 self-assigned this May 17, 2024
@qiaofeng1227
Copy link
Contributor Author

qiaofeng1227 commented May 17, 2024

  1. use php runtime
composer create-project --prefer-dist laravel/laravel myapp
cd myapp && php artisan serve --host=0.0.0.0 --port=8080
  1. refer to: https://hub.docker.com/r/bitnami/laravel

@qiaofeng1227
Copy link
Contributor Author

qiaofeng1227 commented May 20, 2024

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"

@chendelin1982
Copy link
Contributor

@qiaofeng1227
Copy link
Contributor Author

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:

image

@qiaofeng1227
Copy link
Contributor Author

qiaofeng1227 commented May 22, 2024

进入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文件夹

@qiaofeng1227
Copy link
Contributor Author

qiaofeng1227 commented May 23, 2024

https://docs.octobercms.com/3.x/setup/installation.html

我申请的key:WG6ZO-YR5K1-EWY00-PUFKC

@qiaofeng1227
Copy link
Contributor Author

laravelfans/laravel容器本身有APP_KEY这个环境变量,如果把它设置在docker-compose.yml中,它优先级最高。对容器内的环境变量有影响,将APP_KEY这个环境变量注释掉就不会报错了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Type label, New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants