Skip to content

zhwei/docker-php-dev

Repository files navigation

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published