Changes the way to handle private files

This commit is contained in:
pierreozoux 2015-02-20 17:57:53 +00:00
parent 67fb940954
commit 17b62b2519
2 changed files with 4 additions and 4 deletions

View file

@ -86,7 +86,7 @@ function scaffold () {
fi
info "Creating application folder"
mkdir -p ${FOLDER}
mkdir -p ${APP_FOLDER}
info "Creating .env"
echo "EMAIL=${arg_e}" > ${FOLDER}/.env
@ -96,6 +96,7 @@ function scaffold () {
echo DOCKER_ARGUMENTS="-v ${APP_FOLDER}/www-content:/app" >> ${FOLDER}/.env
;;
"wordpress" )
touch ${APP_FOLDER}/.htaccess
echo APPLICATION=${arg_a} >> ${FOLDER}/.env
echo DOCKER_ARGUMENTS="--link mysql-${arg_u}:db \
-v ${APP_FOLDER}/data:/app/wp-content \
@ -103,6 +104,7 @@ function scaffold () {
--env-file ${APP_FOLDER}/.env" >> ${FOLDER}/.env
;;
"known" )
touch ${APP_FOLDER}/.htaccess
echo APPLICATION=${arg_a} >> ${FOLDER}/.env
echo DOCKER_ARGUMENTS="--link mysql-${arg_u}:db \
-v ${APP_FOLDER}/data:/app/Uploads \

View file

@ -18,9 +18,7 @@ RemainAfterExit=yes
EnvironmentFile=/data/domains/%i/.env
ExecStart=/bin/bash -euxc ' \
application_folder=/data/domains/%i/${APPLICATION}; \
if [ ! -d $application_folder ]; then \
mkdir -p $application_folder; \
touch $application_folder/.htaccess; \
if [ ! -f $application_folder/.env ]; then \
cat /data/domains/%i/mysql/.env | sed s/MYSQL_PASS/DB_PASS/ > $application_folder/.env; \
fi;'