This project use docker compose
to handle the containers.
The docker-compose.yml
file contains 5 services:
lb
proxy/load balancer to handle http request.database
contains databasenode
contains node modulesapp
contains php and source codemailhog
contains mailhog to test emails
Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy.
Repository: https://github.com/traefik/traefik
Documentation: https://doc.traefik.io/traefik/
Image: https://registry.hub.docker.com/_/traefik tag v2.3
Configuration file: doi2pmh-server/docker/traefik/traefik.yml
The database service loads the .env
file data to set mysql variables.
No need to edit the docker-compose.yml
file edit the .env
file instead.
Image: https://registry.hub.docker.com/_/mariadb tagg 10
The node service is used to install and store node dependencies.
Image: doi2pmh-server/docker/node/Dockerfile
The folder doi2pmh-server/docker/node/files
is copied into the container and contains the node install script.
The app service container contains php installations, dependencies and source code.
Image: doi2pmh-server/Dockerfile
The following configuration is present in doi2pmh-server/docker/php/files
and copied in the image:
- Composer install script
php.ini
configuration file- Apache configuration file
000-default.conf
.
Mailhog is a simple SMTP server for email testing.
Image: https://registry.hub.docker.com/r/mailhog/mailhog tag latest Repository: https://github.com/mailhog/MailHog