examples improvement - added some README.md stubs
This commit is contained in:
parent
55186bbef5
commit
22e2fe869f
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,11 @@
|
|||
# Multisite basic
|
||||
|
||||
This is a basic example for hosting multiple web services.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/multisite-basic/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/multisite-basic/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Multisite with custom configurations
|
||||
|
||||
This is a basic example for hosting multiple web services with custom configurations.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/multisite-custom-confs/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/multisite-custom-confs/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Multisite with custom subfolders
|
||||
|
||||
This is a basic example for hosting multiple web services with custom subfolders.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/multisite-custom-subfolders/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/multisite-custom-subfolders/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Nextcloud
|
||||
|
||||
Nextcloud is a suite of client-server software for creating and using file hosting services. It is enterprise-ready with comprehensive support options. See the official [website](https://nextcloud.com/) and [repository](https://github.com/nextcloud/server) for more information.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/nextcloud/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/nextcloud/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Passbolt
|
||||
|
||||
Passbolt is a free open source password manager for teams. See the official [website](https://www.passbolt.com/) and [repository](https://github.com/passbolt/passbolt_api) for more information.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/passbolt/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/passbolt/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# PrestaShop
|
||||
|
||||
PrestaShop is a freemium, open source e-commerce platform. See the official [website](https://www.prestashop.com) and [repository](https://github.com/PrestaShop/PrestaShop) for more information.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/prestashop/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/prestashop/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Redmine
|
||||
|
||||
Redmine is a free and open source, web-based project management and issue tracking tool. See the official [website](https://www.redmine.org) and [repository](https://svn.redmine.org/redmine/) for more information.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/redmine/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/redmine/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Reverse proxy multisite
|
||||
|
||||
Simple example to show how to setup bunkerized-nginx in front of some existing HTTP services. Each service has its own domain hence the multisite.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/reverse-proxy-multisite/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/reverse-proxy-multisite/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Reverse proxy single site
|
||||
|
||||
Simple example to show how to setup bunkerized-nginx in front of some existing HTTP services. Each service share the same domain(s) and are accessible from different paths.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/reverse-proxy-singlesite/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/reverse-proxy-singlesite/docker-compose.yml).
|
|
@ -0,0 +1,11 @@
|
|||
# Reverse proxy with websocket
|
||||
|
||||
Simple example to show how to setup bunkerized-nginx in front of some existing WebSocket services.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/reverse-proxy-websocket/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/reverse-proxy-websocket/docker-compose.yml).
|
|
@ -1,38 +0,0 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
autoconf:
|
||||
image: bunkerity/bunkerized-nginx-autoconf
|
||||
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||
# don't forget to edit the permissions of the files and folders accordingly
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /shared/confs:/etc/nginx
|
||||
- /shared/letsencrypt:/etc/letsencrypt
|
||||
- /shared/acme-challenge:/acme-challenge
|
||||
- /shared/cache:/cache
|
||||
environment:
|
||||
- SWARM_MODE=yes
|
||||
- API_URI=/ChangeMeToSomethingHardToGuess # must match API_URI from nginx
|
||||
networks:
|
||||
- net_config
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==manager"
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
networks:
|
||||
- net_config
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==worker"
|
||||
|
||||
networks:
|
||||
net_config:
|
||||
external: true
|
|
@ -0,0 +1,22 @@
|
|||
# Swarm wit hredis
|
||||
|
||||
Basic examples on how to deploy and use bunkerized-nginx within a Docker Swarm cluster and use redis to distribute the blacklists. See the [Docker Swarm](#TODO) section of the documentation for more information.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/swarm-redis/architecture.png?raw=true" />
|
||||
|
||||
## Swarm
|
||||
|
||||
This example uses two overlay networks needed by the services :
|
||||
|
||||
```shell
|
||||
$ docker network create -d overlay --attachable net_config
|
||||
$ docker network create -d overlay --attachable net_services
|
||||
```
|
||||
|
||||
First you need to create the redis service : see [redis.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/swarm-redis/redis.yml).
|
||||
|
||||
Then, it's time to setup bunkerized-nginx and the autoconf with Swarm mode activated : see [nginx-autoconf.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/swarm-redis/nginx-autoconf.yml).
|
||||
|
||||
Then you can add and delete your web services and autoconf will automatically generate the configuration based on your labels : see [services.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/swarm-redis/services.yml).
|
|
@ -12,6 +12,8 @@ services:
|
|||
- /shared/letsencrypt:/etc/letsencrypt
|
||||
- /shared/acme-challenge:/acme-challenge
|
||||
- /shared/cache:/cache
|
||||
- /shared/modsec-confs:/modsec-confs:ro
|
||||
- /shared/modsec-crs-confs:/modsec-crs-confs:ro
|
||||
environment:
|
||||
- SWARM_MODE=yes
|
||||
- API_URI=/ChangeMeToSomethingHardToGuess # must match API_URI from nginx
|
||||
|
@ -42,8 +44,12 @@ services:
|
|||
- /shared/acme-challenge:/acme-challenge:ro
|
||||
- /shared/www:/www:ro
|
||||
- /shared/cache:/cache:ro
|
||||
- /shared/modsec-confs:/modsec-confs:ro
|
||||
- /shared/modsec-crs-confs:/modsec-crs-confs:ro
|
||||
environment:
|
||||
- SWARM_MODE=yes
|
||||
- USE_REDIS=yes
|
||||
- REDIS_HOST=redis
|
||||
- USE_API=yes
|
||||
- API_URI=/ChangeMeToSomethingHardToGuess # must match API_URI from autoconf
|
||||
- MULTISITE=yes
|
||||
|
@ -63,43 +69,8 @@ services:
|
|||
labels:
|
||||
- "bunkerized-nginx.AUTOCONF"
|
||||
|
||||
app1:
|
||||
image: php:fpm-alpine
|
||||
volumes:
|
||||
- /shared/www/app1.example.com:/www
|
||||
networks:
|
||||
- net_services
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==worker"
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app1.example.com"
|
||||
- "bunkerized-nginx.REMOTE_PHP=app1"
|
||||
- "bunkerized-nginx.REMOTE_PHP_PATH=/www"
|
||||
|
||||
app2:
|
||||
image: phpmyadmin:apache
|
||||
environment:
|
||||
- PMA_ARBITRARY=1
|
||||
- PMA_ABSOLUTE_URI=https://app2.example.com
|
||||
networks:
|
||||
- net_services
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==worker"
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app2.example.com"
|
||||
- "bunkerized-nginx.USE_PROXY_CACHE=yes"
|
||||
- "bunkerized-nginx.USE_REVERSE_PROXY=yes"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://app2"
|
||||
|
||||
networks:
|
||||
net_config:
|
||||
driver: overlay
|
||||
external: true
|
||||
net_services:
|
||||
driver: overlay
|
||||
external: true
|
|
@ -0,0 +1,17 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
networks:
|
||||
- net_config
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==worker"
|
||||
|
||||
networks:
|
||||
net_config:
|
||||
external: true
|
|
@ -0,0 +1,20 @@
|
|||
# Swarm
|
||||
|
||||
Basic examples on how to deploy and use bunkerized-nginx within a Docker Swarm cluster. See the [Docker Swarm](#TODO) section of the documentation for more information.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/swarm/architecture.png?raw=true" />
|
||||
|
||||
## Swarm
|
||||
|
||||
This example uses two overlay networks needed by the services :
|
||||
|
||||
```shell
|
||||
$ docker network create -d overlay --attachable net_config
|
||||
$ docker network create -d overlay --attachable net_services
|
||||
```
|
||||
|
||||
First you will need to setup bunkerized-nginx and the autoconf with Swarm mode activated : see [nginx-autoconf.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/swarm/nginx-autoconf.yml).
|
||||
|
||||
Then you can add and delete your web services and autoconf will automatically generate the configuration based on your labels : see [services.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/swarm/services.yml).
|
|
@ -2,6 +2,29 @@ version: '3.8'
|
|||
|
||||
services:
|
||||
|
||||
autoconf:
|
||||
image: bunkerity/bunkerized-nginx-autoconf
|
||||
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||
# don't forget to edit the permissions of the files and folders accordingly
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /shared/confs:/etc/nginx
|
||||
- /shared/letsencrypt:/etc/letsencrypt
|
||||
- /shared/acme-challenge:/acme-challenge
|
||||
- /shared/cache:/cache
|
||||
- /shared/modsec-confs:/modsec-confs:ro
|
||||
- /shared/modsec-crs-confs:/modsec-crs-confs:ro
|
||||
environment:
|
||||
- SWARM_MODE=yes
|
||||
- API_URI=/ChangeMeToSomethingHardToGuess # must match API_URI from nginx
|
||||
networks:
|
||||
- net_config
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==manager"
|
||||
|
||||
nginx:
|
||||
image: bunkerity/bunkerized-nginx
|
||||
ports:
|
||||
|
@ -21,6 +44,8 @@ services:
|
|||
- /shared/acme-challenge:/acme-challenge:ro
|
||||
- /shared/www:/www:ro
|
||||
- /shared/cache:/cache:ro
|
||||
- /shared/modsec-confs:/modsec-confs:ro
|
||||
- /shared/modsec-crs-confs:/modsec-crs-confs:ro
|
||||
environment:
|
||||
- SWARM_MODE=yes
|
||||
- USE_API=yes
|
||||
|
@ -31,8 +56,6 @@ services:
|
|||
- REDIRECT_HTTP_TO_HTTPS=yes
|
||||
- DISABLE_DEFAULT_SERVER=yes
|
||||
- USE_CLIENT_CACHE=yes
|
||||
- USE_REDIS=yes
|
||||
- REDIS_HOST=redis
|
||||
networks:
|
||||
- net_config
|
||||
- net_services
|
|
@ -0,0 +1,42 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
app1:
|
||||
image: php:fpm-alpine
|
||||
volumes:
|
||||
- /shared/www/app1.example.com:/www
|
||||
networks:
|
||||
- net_services
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==worker"
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app1.example.com"
|
||||
- "bunkerized-nginx.REMOTE_PHP=app1"
|
||||
- "bunkerized-nginx.REMOTE_PHP_PATH=/www"
|
||||
|
||||
app2:
|
||||
image: phpmyadmin:apache
|
||||
environment:
|
||||
- PMA_ARBITRARY=1
|
||||
- PMA_ABSOLUTE_URI=https://app2.example.com
|
||||
networks:
|
||||
- net_services
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- "node.role==worker"
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app2.example.com"
|
||||
- "bunkerized-nginx.USE_PROXY_CACHE=yes"
|
||||
- "bunkerized-nginx.USE_REVERSE_PROXY=yes"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://app2"
|
||||
|
||||
networks:
|
||||
net_services:
|
||||
external: true
|
|
@ -0,0 +1,11 @@
|
|||
# Syslog
|
||||
|
||||
Send bunkerized-nginx logs to a remote syslog server.
|
||||
|
||||
## Architecture
|
||||
|
||||
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/syslog/architecture.png?raw=true" />
|
||||
|
||||
## Docker
|
||||
|
||||
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/syslog/docker-compose.yml).
|
Loading…
Reference in New Issue