|
1 | 1 | # Nginx, Php-fpm and MySQL/PostgreSQL stack with Certbot from Docker compose
|
2 | 2 |
|
3 | | -``` |
4 | | -This repository is accompanied by a step-by-step guide on [Boilerplate for nginx with Let’s Encrypt on docker-compose](https://github.com/wmnnd/nginx-certbot). |
5 | | -``` |
| 3 | + |
| 4 | +> This repository is accompanied by a step-by-step guide on [Boilerplate for nginx with Let’s Encrypt on docker-compose](https://github.com/wmnnd/nginx-certbot). |
| 5 | + |
6 | 6 |
|
7 | 7 | This repo to create Nginx, Php-fpm and MySQL/PostgreSQL stack with Certbot from docker-compose.yml file.
|
8 | 8 |
|
9 | | -init-letsencrypt.sh fetches and ensures the renewal of a Let’s Encrypt certificate for one or multiple domains in a docker-compose setup with nginx. This is useful when you need to set up nginx as a reverse proxy for an application. |
| 9 | +```init-letsencrypt.sh``` fetches and ensures the renewal of a Let’s Encrypt certificate for one or multiple domains in a docker-compose setup with nginx. This is useful when you need to set up nginx as a reverse proxy for an application. |
10 | 10 |
|
11 | 11 | ## Installation
|
12 | 12 | 1. Install docker-compose.
|
13 | 13 |
|
14 | 14 | 2. Clone this repository: ``` git clone https://github.com/tobing/nginx-certbot-php-mysql-docker.git```
|
15 | 15 |
|
16 | 16 | 3. Modify configuration:
|
17 | | -Add domains and email addresses to init-letsencrypt.sh |
18 | | -- Replace all occurrences of example.org with primary domain (the first one you added to init-letsencrypt.sh) in data/nginx/app.conf |
19 | | -- Run the init script: ```./init-letsencrypt.sh``` |
| 17 | +- Add domains and email addresses to init-letsencrypt.sh |
| 18 | +- Replace all occurrences of example.org with primary domain in ```/nginx/app.conf``` and ```/nginx.localhost/app.conf``` |
| 19 | +- Uncomment ```- ./nginx.localhost:/etc/nginx/conf.d``` and comment ```- ./nginx:/etc/nginx/conf.d``` in docker-compose.yml file. This setting to generate certificate for the first time |
| 20 | +4. Run the init script: ```./init-letsencrypt.sh``` |
| 21 | + |
| 22 | +5. Comment ```- ./nginx.localhost:/etc/nginx/conf.d``` and uncomment ```- ./nginx:/etc/nginx/conf.d``` in docker-compose.yml file. |
20 | 23 |
|
21 | | -4. Run the server: ```docker-compose up``` |
| 24 | +6. Run the server: ```docker-compose up``` |
0 commit comments