Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nohaapav/docker-nginx
Lightweight Alpine s6 based Nginx with SSL termination & envplate support used primary for swarm cluster.
https://github.com/nohaapav/docker-nginx
certificate docker docker-secrets docker-swarm docker-swarm-mode nginx nginx-docker ssl-termination swarm swarm-cluster
Last synced: 26 days ago
JSON representation
Lightweight Alpine s6 based Nginx with SSL termination & envplate support used primary for swarm cluster.
- Host: GitHub
- URL: https://github.com/nohaapav/docker-nginx
- Owner: nohaapav
- Created: 2016-06-27T16:51:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-15T12:37:50.000Z (over 7 years ago)
- Last Synced: 2024-11-12T11:44:04.669Z (3 months ago)
- Topics: certificate, docker, docker-secrets, docker-swarm, docker-swarm-mode, nginx, nginx-docker, ssl-termination, swarm, swarm-cluster
- Language: HTML
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-nginx
Lightweight Alpine s6 based Nginx with SSL termination & envplate support used primary for swarm cluster.## Prerequisites
* docker 1.13 + (swarm mode)
* nginx service must be in same overlay network as proxied service (DNS service discovery)
* certificate must match domain name## Setup
1. Generate certificate
2. Create secret key ``docker secret create test.domain.com.key test.domain.com.key``
3. Create secret crt ``docker secret create test.domain.com.crt test.domain.com.crt``
4. Run
```{r, engine='bash', count_lines}
docker service create \
--network gnet \
--name nginx \
--secret test.domain.com.key \
--secret test.domain.com.crt \
--env SERVICE_URL=service:8080 \
--env SERVICE_DOMAIN=test.domain.com \
--publish 80:80 \
--publish 443:443 \
nohaapav/nginx:latest
```