Skip to content

Commit 13c7e30

Browse files
authored
Update README.md
1 parent 056dbaf commit 13c7e30

File tree

1 file changed

+41
-51
lines changed

1 file changed

+41
-51
lines changed

README.md

Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
2-
# THIS REPO WAS CONVERTED TO WEBPROXY
3-
## https://github.com/evertramos/webproxy/
4-
(to simplify naming convetion)
5-
6-
It will be synced until Jun of 2018.
7-
8-
---
9-
10-
# Usage of Docker Compose (docker-compose) with NGINX proxy and Letsencrypt
1+
# Usage of Docker Compose (docker-compose) with NGINX Proxy and Letsencrypt
112

123
Docker Compose (docker-compose) for [docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion)
134

@@ -24,10 +15,10 @@ In order to use, you must follow these steps:
2415
1. Clone this repository:
2516

2617
```bash
27-
git clone https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion.git
18+
git clone https://github.com/evertramos/webproxy.git
2819
```
2920

30-
Or just copy the content of `docker-compose.yml`, as of below:
21+
Or just copy the content of `docker-compose.yml`, as of below and substitute with your own configuration settings:
3122

3223
```bash
3324
version: '3'
@@ -36,11 +27,11 @@ services:
3627
image: nginx
3728
labels:
3829
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
39-
container_name: nginx
30+
container_name: ${NGINX_WEB}
4031
restart: unless-stopped
4132
ports:
42-
- "80:80"
43-
- "443:443"
33+
- "${IP}:80:80"
34+
- "${IP}:443:443"
4435
volumes:
4536
- ${NGINX_FILES_PATH}/conf.d:/etc/nginx/conf.d
4637
- ${NGINX_FILES_PATH}/vhost.d:/etc/nginx/vhost.d
@@ -50,7 +41,7 @@ services:
5041
nginx-gen:
5142
image: jwilder/docker-gen
5243
command: -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
53-
container_name: nginx-gen
44+
container_name: ${DOCKER_GEN}
5445
restart: unless-stopped
5546
volumes:
5647
- ${NGINX_FILES_PATH}/conf.d:/etc/nginx/conf.d
@@ -62,7 +53,7 @@ services:
6253

6354
nginx-letsencrypt:
6455
image: jrcs/letsencrypt-nginx-proxy-companion
65-
container_name: nginx-letsencrypt
56+
container_name: ${LETS_ENCRYPT}
6657
restart: unless-stopped
6758
volumes:
6859
- ${NGINX_FILES_PATH}/conf.d:/etc/nginx/conf.d
@@ -71,54 +62,52 @@ services:
7162
- ${NGINX_FILES_PATH}/certs:/etc/nginx/certs:rw
7263
- /var/run/docker.sock:/var/run/docker.sock:ro
7364
environment:
74-
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
75-
NGINX_PROXY_CONTAINER: "nginx"
76-
```
77-
78-
2. Create an `.env` file and say where you will locate the nginx files:
79-
80-
```
81-
NGINX_FILES_PATH=/path/to/your/nginx/data
82-
```
83-
84-
3. Change the file `docker-compose.yml` with you own settings:
85-
86-
3.1. Set your PROXY Network
65+
NGINX_DOCKER_GEN_CONTAINER: ${DOCKER_GEN}
66+
NGINX_PROXY_CONTAINER: ${NGINX_WEB}
8767

88-
Your wordpress container must be in the same network of your nginx proxy.
89-
```bash
9068
networks:
9169
default:
9270
external:
93-
name: your-network-name
71+
name: ${NETWORK}
9472
```
9573

96-
3.2. Set your IP address (optional)
97-
98-
On the line `ports` add as follow:
99-
```bash
100-
ports:
101-
- "YOUR_PUBLIC_IP:80:80"
102-
- "YOUR_PUBLIC_IP:443:443"
74+
2. Create an `.env` file as of our `.env.sample`, save it in the same folder as your compose file:
10375

76+
```
77+
#
78+
# WEBPROXY
79+
#
80+
# A Web Proxy using docker with NGINX with Let's Encrypt
81+
# And our great community docker-gen, nginx-proxy and docker-letsencrypt-nginx-proxy-companion
82+
#
83+
# This is the .env file to set up your webproxy enviornment
84+
85+
# Define the names for your local containers
86+
NGINX_WEB=nginx-web
87+
DOCKER_GEN=nginx-gen
88+
LETS_ENCRYPT=nginx-letsencrypt
89+
90+
# Your external IP address
91+
IP=0.0.0.0
92+
93+
# Network name
94+
NETWORK=webproxy
95+
96+
# NGINX file path
97+
NGINX_FILES_PATH=/path/to/your/nginx/data
10498
```
10599

106-
4. Get the latest version of **nginx.tmpl** file (only if you have not cloned this repostiry)
100+
4. Run our start script
107101

108102
```bash
109-
curl https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl > nginx.tmpl
103+
# ./run.sh
110104
```
111-
Make sure you are in the same folder of docker-compose file, if not, you must update the the settings `- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro`.
112105

113-
5. Start your project
114-
```bash
115-
docker-compose up -d
116-
```
106+
Your proxy is ready to go!
117107

118-
> Please note that when running a new container to generate certificates with LetsEncrypt it may take a few minutes, depending on multiples circunstances.
119108

109+
> Please note that when running a new container to generate certificates with LetsEncrypt it may take a few minutes, depending on multiples circunstances.
120110
121-
Your proxy is ready to go!
122111

123112

124113
## Next Step
@@ -134,8 +123,9 @@ Or you can run your own containers with the option `-e VIRTUAL_HOST=foo.bar.com`
134123
## Credits
135124

136125
All credits goes to:
137-
- [@jwilder](https://github.com/jwilder/nginx-proxy)
138-
- [@JrCs](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion)
126+
- nginx-proxy [@jwilder](https://github.com/jwilder/nginx-proxy)
127+
- docker-gen [@jwilder](https://github.com/jwilder/docker-gen)
128+
- dockher-letsencrypt-nginx-proxy-companion [@JrCs](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion)
139129

140130

141131
### Special thanks to:

0 commit comments

Comments
 (0)