This is a sample for deploying a Laravel and Next.js application in an environment built with Docker and Ansible.
Everything will be installed on a single server.
The environment is constructed using versions that contain vulnerabilities.
Component | Version | Vulnerability | Note |
---|---|---|---|
nginx | 1.22.0 | CVE-2022-41741 | |
PHP | 8.2.7 | CVE-2023-3823 | |
Composer | latest | ||
Laravel | 8.x | CVE-2022-40482 | |
Node.js | 18.x.x | ||
npm | 10.x.x | ||
Next.js | 12.0.8 | CVE-2022-21721 |
-
Start the container and enter the web container.
docker compose up -d docker exec -it web /bin/bash
-
Inside the web container, run the following commands.
You can choose project type from the following.
cd /opt/ansible ansible-playbook install.yml ansible-playbook deploy.yml
-
Access https://localhost:8443/ .