Skip to content

Local server based in Nginx using Docker to facilitate the configuration of the development environment.

License

Notifications You must be signed in to change notification settings

naccarati/docker-nginx-environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Based Local Server

Local server based in Nginx using Docker to facilitate the configuration of the development environment.

Dependencies

  1. Docker 1.11+
  2. Docker-compose 1.7+

Starting the Environment

After installing Docker and Docker Compose, enter in the project root folder and execute the command bellow:

$ sudo docker-compose up -d --build

This command will download the Nginx docker image, build a new one with the environment configurations and run a new docker container using ports 80 and 443.

Restarting the Environment

In the root folder of the project, execute the command bellow:

$ sudo docker-compose restart

Removing the Environment

In the root folder of the project, execute the command bellow:

$ sudo docker-compose down

Configuring your projects

Inside the root folder, there is a folder named projects. This folder is where you will put all you project folders. After that, you need to create a new server block inside the files on the folder confs. You can you the examples inside the file. If you want an http project, use the file http.conf, if it's https, https.conf. After that, you need to restart the docker container.

PS.: Even if you put all your projects inside projects folder, inside the nginx conf, on the server block the root folder of the project will always be /usr/share/nginx/YOUR-PROJECT-NAME

$ sudo docker-compose restart

About

Local server based in Nginx using Docker to facilitate the configuration of the development environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages