Docker for phalcon5-skeleton with PHP-FPM 8.2, Phalcon 5.3, MariaDB 10 and Redis 7 on Alpine Linux
Repository: https://github.com/notesz/phalcon5-skeleton-docker
The goal of this container is to provide an example for running PHP8 and Phalcon5 in a container which follows the best practices and is easy to understand and modify to your needs.
Originally it has been designed for phalcon5-skeleton.
So the project folder contains the release 1.2.
- Uses PHP 8.2 and Phalcon 5.3
- Uses main PHP extensions: bcmath, ctype, curl, exif, gd, imagick, json, mbstring, pdo, etc...
- Uses MariaDB 10 (with phpMyAdmin)
- Uses Redis 7
- Install and run composer
- Run Phalcon migration
- Install webpack and run a build
- Download the files
- Create a .env from .env.example and modify it in the main folder (the example contains my recommended settings)
- Modify your project config. If your
APP_NAME
isphp8phalcon5
, the database host isphp8phalcon5_mariadb
, redis host isphp8phalcon5_redis
.
In the main directory run the container with docker-compose
docker-compose up -d
When your environment was launched you can open it in your browser.
- your project: http://localhost
- phpMyAdmin: http://localhost:8080
You can edit these port numbers in your .env: APP_PORT
, PMA_PORT
In the main directory stop tha container with docker-compose
docker-compose down
This container contains phalcon-skeleton project in /www
folder.
If you want to run your own project delete it.
And if you don't use composer, phalcon migration or webpack don't forget to remove these commands from ./src/entrypoint.sh
before run docker-compose. Don't forget to modify cron settings in ./config/crontabs
too.
If you want to use phalcon-skeleton you can find more info about it here.