examples - polishing before next release
This commit is contained in:
@@ -8,6 +8,6 @@ Quickly deploy web app on Docker containers without restarting bunkerized-nginx.
|
||||
|
||||
## Autoconf
|
||||
|
||||
First of all, you need to run bunkerized-nginx and bunkerized-nginx-autoconf : see [docker-compose-nginx.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/autoconf-reverse-proxy/docker-compose-nginx.yml).
|
||||
First of all, you need to setup the [Docker autoconf integration](https://bunkerized-nginx.readthedocs.io/en/latest/integrations.html#docker-autoconf).
|
||||
|
||||
Then, you can add and remove web apps with special `bunkerized-nginx.*` labels so the configurations are automatically generated : see [docker-compose-apps.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/autoconf-reverse-proxy/docker-compose-apps.yml).
|
||||
Then, you can add and remove web apps with special `bunkerized-nginx.*` labels so the configurations are automatically generated : see [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/autoconf-reverse-proxy/docker-compose.yml).
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
mywww:
|
||||
image: bunkerity/bunkerized-nginx
|
||||
restart: always
|
||||
ports:
|
||||
- 80:8080
|
||||
- 443:8443
|
||||
# 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:
|
||||
- ./letsencrypt:/etc/letsencrypt
|
||||
- autoconf:/etc/nginx
|
||||
environment:
|
||||
- SERVER_NAME= # must be left blank if you don't want to setup "static" conf
|
||||
- MULTISITE=yes
|
||||
- AUTO_LETS_ENCRYPT=yes
|
||||
- REDIRECT_HTTP_TO_HTTPS=yes
|
||||
- DISABLE_DEFAULT_SERVER=yes
|
||||
- USE_CLIENT_CACHE=yes
|
||||
- USE_PROXY_CACHE=yes
|
||||
- USE_GZIP=yes
|
||||
- USE_REVERSE_PROXY=yes
|
||||
labels:
|
||||
- "bunkerized-nginx.AUTOCONF"
|
||||
networks:
|
||||
- myappnet
|
||||
|
||||
myautoconf:
|
||||
image: bunkerity/bunkerized-nginx-autoconf
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- autoconf:/etc/nginx
|
||||
depends_on:
|
||||
- mywww
|
||||
|
||||
volumes:
|
||||
autoconf:
|
||||
|
||||
networks:
|
||||
myappnet:
|
||||
name: myappnet
|
||||
@@ -4,47 +4,44 @@ services:
|
||||
|
||||
myapp1:
|
||||
build: js-app
|
||||
restart: always
|
||||
networks:
|
||||
services-net:
|
||||
aliases:
|
||||
- myapp1
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app1.example.com" # replace with your domain
|
||||
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://myapp1:3000"
|
||||
networks:
|
||||
myappnet:
|
||||
aliases:
|
||||
- myapp1
|
||||
|
||||
myapp2:
|
||||
build: js-app
|
||||
restart: always
|
||||
networks:
|
||||
services-net:
|
||||
aliases:
|
||||
- myapp2
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app2.example.com" # replace with your domain
|
||||
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://myapp2:3000"
|
||||
networks:
|
||||
myappnet:
|
||||
aliases:
|
||||
- myapp2
|
||||
|
||||
myapp3:
|
||||
build: js-app
|
||||
restart: always
|
||||
networks:
|
||||
services-net:
|
||||
aliases:
|
||||
- myapp3
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
labels:
|
||||
- "bunkerized-nginx.SERVER_NAME=app3.example.com" # replace with your domain
|
||||
- "bunkerized-nginx.REVERSE_PROXY_URL=/"
|
||||
- "bunkerized-nginx.REVERSE_PROXY_HOST=http://myapp3:3000"
|
||||
networks:
|
||||
myappnet:
|
||||
aliases:
|
||||
- myapp3
|
||||
|
||||
networks:
|
||||
myphpnet:
|
||||
services-net:
|
||||
external:
|
||||
name: myphpnet
|
||||
name: services-net
|
||||
Reference in New Issue
Block a user