examples - update authelia and autoconf-php

This commit is contained in:
bunkerity 2021-08-04 10:47:38 +02:00
parent b6809266af
commit 6d73fbdedb
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
6 changed files with 88 additions and 33 deletions

View File

@ -0,0 +1,19 @@
# Authelia
Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for your applications via a web portal. See [website](https://www.authelia.com/) and [GitHub repo](https://github.com/authelia/authelia) for more information.
## Preamble
We will assume that you already have some basic knownledges about Authelia. If that's not the case, you should read their [documentation](https://www.authelia.com/) first.
## Architecture
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/authelia/architecture.png?raw=true" />
## Configuration
First of all, you will need to edit the configuration files inside the authelia folder (e.g. : domains, DB backend, email notifier, ...).
## Docker
See [docker-compose.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/authelia/docker-compose.yml).

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,13 @@
# Autoconf PHP
Quickly deploy PHP app on Docker containers without restarting bunkerized-nginx.
## Architecture
<img src="https://github.com/bunkerity/bunkerized-nginx/blob/dev/examples/autoconf-php/architecture.png?raw=true" />
## Docker
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-php/docker-compose-nginx.yml).
Then, you can add and remove PHP apps with special `bunkerized-nginx.*` labels so the configurations are automatically generated : see [docker-compose-php.yml](https://github.com/bunkerity/bunkerized-nginx/blob/master/examples/autoconf-php/docker-compose-php.yml).

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -24,6 +24,8 @@ services:
- USE_GZIP=yes
labels:
- "bunkerized-nginx.AUTOCONF"
networks:
- myphpnet
myautoconf:
image: bunkerity/bunkerized-nginx-autoconf
@ -33,39 +35,10 @@ services:
- autoconf:/etc/nginx
depends_on:
- mywww
- myapp1
- myapp2
- myapp3
myapp1:
image: php:fpm
restart: always
volumes:
- ./web-files/app1.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app1.example.com" # replace with your domain
- "bunkerized-nginx.REMOTE_PHP=myapp1"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
myapp2:
image: php:fpm
restart: always
volumes:
- ./web-files/app2.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app2.example.com" # replace with your domain
- "bunkerized-nginx.REMOTE_PHP=myapp2"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
myapp3:
image: php:fpm
restart: always
volumes:
- ./web-files/app3.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app3.example.com" # replace with your domain
- "bunkerized-nginx.REMOTE_PHP=myapp3"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
volumes:
autoconf:
networks:
myphpnet:
name: myphpnet

View File

@ -0,0 +1,50 @@
version: '3'
services:
myapp1:
image: php:fpm
restart: always
volumes:
- ./web-files/app1.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app1.example.com" # replace with your domain
- "bunkerized-nginx.REMOTE_PHP=myapp1"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
networks:
myphpnet:
aliases:
- myapp1
myapp2:
image: php:fpm
restart: always
volumes:
- ./web-files/app2.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app2.example.com" # replace with your domain
- "bunkerized-nginx.REMOTE_PHP=myapp2"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
networks:
myphpnet:
aliases:
- myapp2
myapp3:
image: php:fpm
restart: always
volumes:
- ./web-files/app3.example.com:/app
labels:
- "bunkerized-nginx.SERVER_NAME=app3.example.com" # replace with your domain
- "bunkerized-nginx.REMOTE_PHP=myapp3"
- "bunkerized-nginx.REMOTE_PHP_PATH=/app"
networks:
myphpnet:
aliases:
- myapp3
networks:
myphpnet:
external:
name: myphpnet