zhwei / docker-php-dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local PHP development environment.

Features

  • All in docker
  • HTTPS support
  • Single config file

Setup (macOS)

  1. Install mkcert:

    brew install mkcert
  2. Config your sites in site.json

    • domain is the domain name of your site, eg: comiru.test
      • Remind: need to add to /etc/hosts file, eg: comiru.test 127.0.0.1
    • root is the project public directory
      • Remind: need to mount into container in docker-compose.yml, eg: $HOME/poper
    • fpm is the PHP-FPM service name in docker-compose.yml
    • aliases is the domain aliases of your site, eg: ["www.comiru.test", "sso.comiru.test"]
    • secure is the HTTPS support, default is true
  3. Generate SSL certificates

    python3 generator.py --certs
  4. Start docker containers

    docker compose up -d
  5. Visit your site in browser

About


Languages

Language:Python 48.8%Language:HTML 21.3%Language:Dockerfile 18.1%Language:Shell 6.1%Language:PHP 5.7%