An easy and ready Docker files ready to use in your projects
Add this repository as git submodule:
git submodule add https://www.github.com/terox/docker docker
Note: don't forget add
docker/to your.gitignoreCreate a
docker-compose.ymlin your project root and add the services that you want use, for example the PHP 7.4:version: '2'services: nginx1: container_name: 'myproject.nginx1'build: context: docker/service/nginx1.18.xargs: php_container: 'myproject.php'preset: 'symfony4.conf'domains: www1.example.compublic_path: publicnginx2: container_name: 'myproject.nginx2'build: context: docker/service/nginx1.18.xargs: php_container: 'myproject.php'preset: 'symfony4.conf'domains: www2.example.compublic_path: apps/api/publicports: - 8089:80links: - phpvolumes_from: - php php: container_name: 'myproject.php'build: context: docker/service/php7.4-fpmargs: timezone: 'Europe/Madrid'# or you preferred timezonevolumes: - .:/var/www/application
Ready to play:
docker-compose up
Easy. You only need the get the latest commit from master branch:
cd docker && git pullNote: keep in mind that you must use the directory where you stored the submodule