The simple PHP server in Docker with Composer.
It's a basic server for static files or PHP projects. You can use it for testing or development purposes. The server is based on the official PHP image. You can add your files to the app directory or create a symbolic link to your project directory.
Entrypoint is a public dir with the index.php file.
To work with the server, you need Docker installed.
make install- initial setupmake up- start servermake down- stop servermake restart- reboot server with new config or a files linkmake watch- start the server and show realtime logsmake exec- go to the server consolemake logs- view server logs
- Run
make install. The command uses the.env.examplefile as a template (don't change it) and creates a new.envfile where you can specify your free port number. - Copy your files. Add your files to the
appdirectory or create a symbolic link to your project directory. Create a symbolic link:ln -s {project-directory} app, use your own path instead of{project-directory}. Then restart the servermake restart. - For the next, you can run
make upto start andmake downto stop the server.