Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docker dev-boxes for multiple PHP frameworks

License

NotificationsYou must be signed in to change notification settings

sports-match-maker/docker-pnmamhes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is a reusable docker dev-box for multiple frameworks in PHP technology.

Preview Link

Dev-box technology stack

  • PHP 8.1
  • MySql
  • Redis
  • ElasticSearch
  • Kibana
  • Adminer
  • Nginx
  • MailPit

Supported frameworks

*Note: Currently all frameworks supportPHP8.1

Repository skeleton

.├── LICENSE├── README.md├── docker│   ├── db    ---> database init sql script│   ├── nginx ---> nginx server config file for new project│   ├── php   ---> edit php versions and packages/extensions│   └── redis ---> redis local beck up├── docker-compose.yaml ---> edit volumes, ports, etc.└── src                 ---> put your new projects    ├── codeigniter     ---> supported framework    ├── laravel         ---> supported framework    ├── slim            ---> supported framework    ├── symfony         ---> supported framework    └── yii             ---> supported framework

Extensibility and Reusability

It's totally up to you to make replacements

  • for exampleMySQL ->PgSql orMongoDB
  • for exampleMailPit ->MailHog
  • even to make a clean-up to satisfy your needs.

PHP version upgrade

The change is trivial and is locatedhere

FROM php:8.1-fpm toFROM php:8.2-fpm orFROM php:7.4-fpm

Clean up

  • Go to the default configuration forNginxhereand configure the servers as many projects as with you have in your repo.
  • Go to theinit.sql configuration for databaseshere and make the changes
  • Register the projects as followshere

For example

php-fpm:    container_name: php    build:      context: .      dockerfile: docker/php/Dockerfile    volumes:      - ./src/laravel:/var/www/html/laravel      - ./src/symfony:/var/www/html/symfony      - ./src/codeigniter:/var/www/html/codeigniter      - ./src/slim:/var/www/html/slim      - ./src/yii:/var/www/html/yii    networks:      - docker-pnmamhes  nginx:    container_name: nginx    image: nginx:stable    ports:      - '80:80'      - '81:81'      - '82:82'      - '83:83'      - '84:84'    volumes:      - ./src/laravel:/var/www/html/laravel       - ./src/symfony:/var/www/html/symfony      - ./src/codeigniter:/var/www/html/codeigniter      - ./src/slim:/var/www/html/slim      - ./src/yii:/var/www/html/yii      - ./docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf    networks:      - docker-pnmamhes

[8]ページ先頭

©2009-2025 Movatter.jp