diff --git a/bash/newProject.bash b/bash/newProject.bash index d5274f8..cfcb1e1 100644 --- a/bash/newProject.bash +++ b/bash/newProject.bash @@ -94,12 +94,22 @@ composer require symfony/security-bundle composer require form validator composer require symfonycasts/verify-email-bundle +################################################################################ +# Database +################################################################################ + +composer req -n orm && sleep 1 + +# TODO: In the future you may want to replace this with code +# ( but not here if you are sharing the script) +# sed -n -e '/^DATABASE_URL/p' .env + ################################################################################ # Docker ################################################################################ # For the Apache container -composer req symfony/apache-pack +composer req -n symfony/apache-pack # You need the following variables in your env for docker-compose echo '' >> .env @@ -111,7 +121,8 @@ echo 'DOCKERNET=DOCKER_NETWORK_NAME_FOR_PROXY' >> .env echo "DOCKERPORT=8000" >> .env GEN=`echo $RANDOM | md5sum | head -c 12` echo "MYSQL_ROOT_PASSWORD=${GEN}" >> .env - +echo 'DOCKERPHPMYADMIN=8001' >> .env +echo '' >> .env echo '# Database info, should match your db url' >> .env echo 'DBHOST=mariadb' >> .env echo 'DB=symfony_project' >> .env @@ -119,24 +130,19 @@ GEN=`echo $RANDOM | md5sum | head -c 4` echo "DBUSER=theuser${GEN}" >> .env GEN=`echo $RANDOM | md5sum | head -c 12` echo "DBPASSWORD=${GEN}" >> .env +echo '' >> .env +echo '# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"' + # TODO: move these here after you have symfony production ready +rm docker-compose.yml +rm docker-compose.override.yml echo "Creating a docker-compose" wget https://raw.githubusercontent.com/nickyeoman/phpframework/main/docker/docker-compose.yml echo "Creating a Dockerfile" wget https://raw.githubusercontent.com/nickyeoman/phpframework/main/docker/Dockerfile -################################################################################ -# Database -################################################################################ - -composer req -n orm && sleep 1 - -# TODO: In the future you may want to replace this with code -# ( but not here if you are sharing the script) -# sed -n -e '/^DATABASE_URL/p' .env - ################################################################################ # Git ################################################################################ diff --git a/docs/Docker.md b/docs/Docker.md new file mode 100644 index 0000000..0babe4b --- /dev/null +++ b/docs/Docker.md @@ -0,0 +1,3 @@ +# Docker Docs + +You should be able to manually parse the docker compose file. \ No newline at end of file