API Platform projects can be run through Docker. A Docker compose configuration, including a fully working LAMP stack, is shipped with the API Platform distribution.
The Docker Compose configuration comes with several ready-to-use services by default:
Name | Description | Port(s) |
---|---|---|
app | The application with PHP and PHP-FPM 7.1, the latest Composer | N/A |
db | A database provided by MySQL 5.7 | N/A |
nginx | An HTTP server provided by Nginx 1.11 | 8080 |
varnish | An HTTP cache provided by Varnish 4.1 | 80 |
To install it, run the following commands (Docker must be installed on your system):
$ docker-compose up -d # Download, build and run Docker images
$ docker-compose exec app bin/console doctrine:schema:create # Create the MySQL schema
Your project will be accessible in two different ways:
http://localhost
http://localhost:8080
Made with love by
Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.
Learn more