Schema Docker-Laravel Bash script:

For everything to work you'll need:
- Docker
- Docker-Compose
You'll find everything you need under the docker directory. There's two components you will use: The Nginx Reverse Proxy under the directory nginx and the bash script script.sh.
The reverse proxy needs to be started once at first by going to its directory and using docker compose to build and run the docker container. A network has to be created too.
docker network create net-hostingcd ./projecthosting/docker/nginx
docker-compose up -dThen we give the bash script execute rights and run the script. For each new laravel app, you just execute the script again.
cd ../
chmod +x ./script_laravel.sh
./script_laravel.shOR
If you just want a normal lamp stack execute this one.
cd ../
chmod +x ./script_lamp.sh
./script_lamp.shThe script creates a whole directory for your website. It will be named something like webXX.
In this folder you'll find another folder www where your laravel website should be stored, and mysql where all sql data is stored.
The script will tell you the Virtual Host names of your site.
Everything should now be up and running!
after adding the your project files to www, you can run the next command to install the dependencies if you have a composer.json file
docker-compose exec web composer installTo visit the website, you add the virtual host names together with the machine's ip to your hosts file. It will look someting like this:
192.168.0.XX web.milansterkenswebXX.teamsixhosting
192.168.0.XX phpmyadmin.milansterkenswebXX.teamsixhosting
first you shut down al associated docker containers by going to the site's folder and run:
docker-compose down
docker-compose rm -fAfter this you can delete the whole directory if you want.
- finish script

