Creating a simple php website using Docker-compose. Website will be self-signed.
- Docker-compose is used for easy deploy.
- You can upload your own php website in the website folder which is 'bind mounted' to the container.
- Need to have Docker installed in your machine.
- Need to have Git installed in your machine.
- Need to have Docker-compose installed in your machine.
- Docker installation
- Alternatively from the above, you can use Pre-installed Docker Terminal (For the easy access to configured Docker environment especially for beginers)
- Git installation
- Docker-compose
Steps:
yum install docker -y
yum install git -y
git clone https://github.com/amalbosemathew/self_signed_nginx_php_website
cd self_signed_nginx_php_website/
Cloning the repository from Github and installing docker-compose :
Here you can upload your own code in the website directory. I have used to clone my php website code stored in the github repository
cd website/
git clone https://github.com/amalbosemathew/aws-elb-site ./
Steps
docker-compose config <--------Check whether the configuration in yaml is correct.
docker-compose up -d <---------Creating the container in detach mode.(To reuse the same screen)
docker container ls -a <-------Listing all the container.
docker-compose down -v <--------To stop containers created using the docker-compose and to remove containers, volumes and networks.
The Intention of this Reposistory is to showcase the php website using Docker-compose.