rasodu / DLEMP

0 stars 0 forks source link

Allow to install the package in subdirectory of your project. #8

Closed rasodu closed 8 years ago

rasodu commented 8 years ago

Use git clone to install the package instead of composer to install the package. This will solve the chicken and the egg problem with composer and make installation process easier.

rasodu commented 8 years ago

Replace old #6 for issue #2 installation process with simple git clone to install DLEMP in your project. 1) cd <project-dir> 2) add '/DLEMP' and '/public/phpunit-coverage' and 'public/phpdoc-documentation' to your project's '.gitignore' 3) git clone git@github.com:rasodu/DLEMP.git DLEMP 4) mkdir public 5) mkdir -p docker/docker-config && cp DLEMP/docker/docker-config/letsencrypt-cli.ini docker/docker-config/ 6) Only if you want to deploy(Optional): Set email and domain in 'letsencrypt-cli.ini' 7) cp DLEMP/*.yml . && cp DLEMP/.env .env.example && cp DLEMP/.dockerignore . 8) Uncomment line 'DLEMP_BASE_DIR=DLEMP/' and comment out line 'DLEMP_BASE_DIR=' in '.env' file. 9) Only if using Docker Compose 1.6 or before. Docker Compose 1.7 and after will read this value from .env file.

unset DLEMP_BASE_DIR
export DLEMP_BASE_DIR=vendor/rasodu/dlemp/
echo $DLEMP_BASE_DIR
rasodu commented 8 years ago

Git workflow to merge changes from this package to your project 1) crate an orphan branch git checkout --orphan DLEMP 2) Delete all files and folder from the project folder except '.git' folder

git rm -rf --cached .
git clean -df && git clean -df

3) Use instructions above to copy 'DLEMP' related files into the orphan branch 4) Test DLEMP in orphan branch

cp .env.example .env
docker-compose up -d
docker-compose stop
docker-compose rm
rm .env

5) Commit files to orphan branch

git add .
git commit -m "DLEMP files are copied"

6) Merge DLEMP files into your branch. Check DLEMP works. Commit the changes to your branch.

git push origin DLEMP
git checkout <your-branch>
git merge DLEMP
cp .env.example .env
docker-compose up -d
docker-compose stop
docker-compose rm
git add .
git commit -m "Infrastructure updated."