This is a simple php monolithic environment ready to develop using mariadb like in the old days 💀
git clone [email protected]:brunoandradebr/php-docker.git .
- 📂.database/
- 📂.docker/
- 📂 src/
- 📄.env
DB_USER=admin; # don't use root name. will conflict with default root user
DB_PASS=admin; # defines user and root password as same
DB_NAME=app;
# script for docker compose up
sh dev.sh
sh .database/migrate.sh
sh .database/seed.sh
http://localhost
- php:fpm - (FastCGI Process Manager) Process php files
- nginx:1.25-alpine - Web Server
- mariadb:latest - Database
- php-fpm
- web
- database
- mysqli
- pdo
- pdo_mysql
Tables are generated based on files inside .database folder.
📂 .database/migrations
# For table creation. All sql files will be executed in alphabetical order.
1-create-table-contacts.sql
2-create-table-posts.sql
📂 .database/seeds
# For table population. All sql files will be executed in alphabetical order.
1-populate-table-contacts.sql
2-populate-table-posts.sql