From 444d15c530cbcc51775a352608ec6d88b759164e Mon Sep 17 00:00:00 2001 From: Alexandre Jardin Date: Mon, 29 Oct 2018 11:30:50 +0100 Subject: [PATCH] Add recipe for ajardin/docker-symfony --- ajardin/docker-symfony/0.2/bin/docker-upgrade | 55 +++++++++++++++++++ ajardin/docker-symfony/0.2/manifest.json | 12 ++++ ajardin/docker-symfony/0.2/post-install.txt | 15 +++++ 3 files changed, 82 insertions(+) create mode 100755 ajardin/docker-symfony/0.2/bin/docker-upgrade create mode 100644 ajardin/docker-symfony/0.2/manifest.json create mode 100644 ajardin/docker-symfony/0.2/post-install.txt diff --git a/ajardin/docker-symfony/0.2/bin/docker-upgrade b/ajardin/docker-symfony/0.2/bin/docker-upgrade new file mode 100755 index 00000000..642d9f32 --- /dev/null +++ b/ajardin/docker-symfony/0.2/bin/docker-upgrade @@ -0,0 +1,55 @@ +#!/usr/bin/env php +exists(TARGET_DIRECTORY) === false) { + $filesystem->mkdir(TARGET_DIRECTORY); +} + +/** + * Mirror the vendor directory with the directory created at the project root + */ +if ($filesystem->exists(SOURCE_DIRECTORY) === true) { + $filesystem->mirror(SOURCE_DIRECTORY, TARGET_DIRECTORY, null, ['override' => true]); +} + +/** + * Define the default environment variables + */ +if ($filesystem->exists(TARGET_DIRECTORY . '/.env') === false) { + $filesystem->copy( + TARGET_DIRECTORY . '/.env.dist', + TARGET_DIRECTORY . '/.env' + ); +} + +/** + * Define the default Nginx configuration + */ +if ($filesystem->exists(TARGET_DIRECTORY . '/nginx/conf.d/custom.conf') === false) { + $filesystem->copy( + TARGET_DIRECTORY . '/nginx/conf.d/symfony.conf.dist', + TARGET_DIRECTORY . '/nginx/conf.d/custom.conf' + ); +} + +/** + * Copy the default Makefile at the project root + */ +if ($filesystem->exists('Makefile') === false) { + $filesystem->copy( + TARGET_DIRECTORY . '/Makefile.sample', + 'Makefile' + ); +} diff --git a/ajardin/docker-symfony/0.2/manifest.json b/ajardin/docker-symfony/0.2/manifest.json new file mode 100644 index 00000000..39696682 --- /dev/null +++ b/ajardin/docker-symfony/0.2/manifest.json @@ -0,0 +1,12 @@ +{ + "composer-scripts": { + "bin/docker-upgrade": "php-script" + }, + "copy-from-recipe": { + "bin/": "%BIN_DIR%/" + }, + "gitignore": [ + "/%BIN_DIR%/docker-upgrade", + "/docker/" + ] +} diff --git a/ajardin/docker-symfony/0.2/post-install.txt b/ajardin/docker-symfony/0.2/post-install.txt new file mode 100644 index 00000000..af973e23 --- /dev/null +++ b/ajardin/docker-symfony/0.2/post-install.txt @@ -0,0 +1,15 @@ + + Docker Configuration + + + * Edit the docker/.env file to configure your own settings. + + * Edit the docker/nginx/conf.d/custom.conf file to configure your own virtual host. + + * To manage the Docker environment from the project directory: + - If you already have a Makefile in your project, copy the content of the docker/Makefile.sample file at the top of it. + - If you do not already have a Makefile, the docker/Makefile.sample file will be installed in your project. + + * Run make to display the list of available commands. + +Documentation: https://github.com/ajardin/docker-symfony/wiki