A dockerized developer environment for working with legacy PHP projects. Includes Apache2, PHP 5.2, PHP 5.6, PHP 7.1 and MySQL 5.7.
- PHP 8.2
- Docker (or compatible software like OrbStack)
You also need to be able to resolve .test domains to 127.0.0.1.
- If you have Laravel Valet or Herd installed, you already got this done. Run
sudo brew services start dnsmasqafter stopping Valet or Herd. - Or you can manually add your sites to your
/etc/hostsfile
sh <(curl https://raw.githubusercontent.com/nxu/inas/main/install.sh)This downloads the inas PHAR file to /usr/local/bin/inas, gives it
executable permissions and runs inas install.
You'll be able to run inas from anywhere.
Download the latest inas binary from the
releases and run inas install.
inas startinas stopGo to a site containing your PHP project and run
cd ~/code/myproject
inas add <phpver>
# inas add 5.6
# inas add 7.1This will add the site to Inas. The site will be available at http://myproject.test where
myproject is the name of the folder you added.
cd ~/code/myproject
inas removeFrom the directory of a configured inas site, you can run inas php and inas composer to execute any php or
composer command.
Your sites will be able to access the MySQL5.7 server at the host mysql:
DB_HOST=mysql
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=root- You can access this server from your host at
127.0.0.1:3356. - The database will be persisted in
~/.config/inas/volumes/mysql
You can find the server logs in:
~/.config/inas/volumes/apache_logsfor apache logs~/.config/inas/volumes/nginx_logsfor nginx logs
You can update to the latest version of inas by running the self-updater:
inas self:update