Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mortonprod/nginx-certbot

A simple way to deploy node servers using nginx, cerbot and docker.
https://github.com/mortonprod/nginx-certbot

certbot docker nginx nodejs

Last synced: 1 day ago
JSON representation

A simple way to deploy node servers using nginx, cerbot and docker.

Awesome Lists containing this project

README

        

# nginx-certbot

Based on repository you can find here
[Based on](https://bitbucket.org/automationlogic/le-docker-compose/overview)

* Add networks so app and nginx compose fill separate completely separated.
* Use DNS host name in nginx so we can stop and start containers to different IP addresses

## Running
* Must start app and check component lives in app__default network.

* Build and run nginx-certbox
```
docker-compose build
docker-compose up
```

This will make certbot call through nginx to get cert. Once cert arrived your want reload config so we redirect to https when http requested.
Old config is deleted since we will not need ti again.
Any new app added should run in a a new network(default with docker-compose up)),connect nginx to new network, update nginx config, then restart nginx.

To connect container to new network.
```
docker network connect multi-host-network container1
```
To restart nginx find process and run

```
docker exec ledockercompose_nginx_1 nginx -s reload
```

To update cert rerun certbot

```
docker-compose run letsencrypt
```

and reload nginx