take two.

Free course · Registered members · Lesson 3 / 10

Set up LAMP, the repository and AGENTS.md

Start a repeatable local environment and keep agent instructions in the project.

35 minutes including practiceAll courses

Editorial team: Take Two · Published

Lesson preview

What runs where

LAMP means Linux, Apache, MySQL and PHP. The Docker Compose path runs Apache/PHP in the web service and MySQL in db. The browser uses localhost:8080; the database exposes no host port. Bootstrap and jQuery are included in public/assets. Only public/ is the DocumentRoot; app/, database/, storage/ and .env stay outside the web-accessible directory.

Start with private configuration

Extract the ZIP, copy .env.example to .env and replace all three password/secret placeholders with distinct random values. They are not ready-to-use credentials. Setup creates the schema; a separate command creates an admin and requests its password in the terminal. If db never becomes healthy, inspect docker compose logs db without sharing secrets.

What to check as you practise

  • Only public/ is exposed.
  • .env absent from Git.
  • PHP has PDO MySQL, DOM and cURL.

Continue with the full lesson

Register free to access the complete explanation, examples, exercise and commented answer. This preview stays open to everyone.

Workshop files · Version 1

The reference project

Download the complete blog, English and Italian instructions, SQL schema, agent contracts, fictional fixtures and tests. The sample blog interface is in English. This is a local learning project: password recovery, email verification and MFA remain extensions before opening it to a public community.

Download the blog project (ZIP) →

Free download. Full lessons require a free Take Two account. Codex access depends on your own plan.

Sources and further reading