Add a Linux tips section and move Docker stacks to /srv/docker
This commit is contained in:
@@ -39,14 +39,15 @@ Both modes can be configured on a per-application basis.
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- docker:
|
||||
- authentik:
|
||||
- .env
|
||||
- compose.yml
|
||||
- media/
|
||||
- certs/
|
||||
- custom-template/
|
||||
- ssh/
|
||||
- srv:
|
||||
- docker:
|
||||
- authentik:
|
||||
- .env
|
||||
- compose.yml
|
||||
- media/
|
||||
- certs/
|
||||
- custom-template/
|
||||
- ssh/
|
||||
---
|
||||
::
|
||||
|
||||
@@ -54,12 +55,12 @@ tree:
|
||||
### Create the folders
|
||||
|
||||
```bash [Terminal]
|
||||
sudo mkdir -p /docker/authentik/media /docker/authentik/certs /docker/authentik/custom-template /docker/authentik/ssh
|
||||
sudo mkdir -p /srv/docker/authentik/media /srv/docker/authentik/certs /srv/docker/authentik/custom-template /srv/docker/authentik/ssh
|
||||
```
|
||||
|
||||
### Generate secrets
|
||||
|
||||
Navigate to the `authentik` folder via `cd /docker/authentik` and generate a password and secret key to include in the `.env` file:
|
||||
Navigate to the `authentik` folder via `cd /srv/docker/authentik` and generate a password and secret key to include in the `.env` file:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo echo "PG_PASS=$(openssl rand 36 | base64)" >> .env
|
||||
@@ -70,7 +71,7 @@ sudo echo "AUTHENTIK_SECRET_KEY=$(openssl rand 60 | base64)" >> .env
|
||||
|
||||
To generate the keys, we created the folders ahead of deployment using Dockge. Dockge will prevent you from creating a stack with the same name in these folders unless a `compose.yml` file exists. So, create an empty `compose.yml` so it appears as an inactive stack:
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/authentik/compose.yml
|
||||
sudo nano /srv/docker/authentik/compose.yml
|
||||
```
|
||||
::
|
||||
|
||||
@@ -216,7 +217,7 @@ You can use **File Browser Quantum** to navigate and edit files instead of using
|
||||
::
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/authentik-server.conf
|
||||
sudo nano /srv/docker/swag/config/nginx/authentik-server.conf
|
||||
```
|
||||
|
||||
Verify that the following variables are set correctly:
|
||||
@@ -233,7 +234,7 @@ If not, make the necessary changes, then save with :kbd{value="Ctrl+O"}, :kbd{va
|
||||
Create the `auth.subdomain.conf` file:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/proxy-confs/auth.subdomain.conf
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/auth.subdomain.conf
|
||||
```
|
||||
|
||||
Paste the following configuration:
|
||||
@@ -356,7 +357,7 @@ Why do this when Dockge already has authentication? Because Dockge uses weak HTT
|
||||
Edit the file `dockge.mydomain.com`:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
|
||||
```
|
||||
|
||||
Uncomment the two lines `#include /config/nginx/authentik-server.conf;`
|
||||
@@ -437,10 +438,10 @@ We assume you’ve already installed [Docker](/serveex/core/docker) and [SWAG](/
|
||||
|
||||
On your remote machine, use [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs) to create a stack named `authentik-outpost`.
|
||||
|
||||
If you haven’t installed [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs), create a folder `/docker/authentik-outpost`, or directly via command line:
|
||||
If you haven’t installed [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs), create a folder `/srv/docker/authentik-outpost`, or directly via command line:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo mkdir -P /docker/authentik-outpost
|
||||
sudo mkdir -P /srv/docker/authentik-outpost
|
||||
```
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
@@ -455,7 +456,7 @@ Create the `compose.yaml` file or paste the configuration directly into Dockge i
|
||||
Via command line:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/authentik-outpost/compose.yaml
|
||||
sudo nano /srv/docker/authentik-outpost/compose.yaml
|
||||
```
|
||||
Paste the following configuration, updating the version in `{AUTHENTIK_TAG:proxy:2024.2.3}`{lang=properties} to match your Authentik server version.
|
||||
|
||||
@@ -485,7 +486,7 @@ services:
|
||||
Go to the SWAG stack on the remote machine (or edit directly using Dockge) and add the authentik-outpost network in the configuration file like this (see `networks` section):
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/compose.yaml
|
||||
sudo nano /srv/docker/swag/compose.yaml
|
||||
```
|
||||
|
||||
```yaml [compose.yaml]
|
||||
@@ -519,7 +520,7 @@ If using [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déploye
|
||||
Otherwise, via terminal:
|
||||
|
||||
```bash [Terminal]
|
||||
cd /docker/swag/
|
||||
cd /srv/docker/swag/
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
@@ -530,7 +531,7 @@ Create (or fill using Dockge) the `.env` file in the `authentik-outpost` directo
|
||||
Via command line:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/authentik-outpost/.env
|
||||
sudo nano /srv/docker/authentik-outpost/.env
|
||||
```
|
||||
|
||||
Paste the following configuration:
|
||||
@@ -556,7 +557,7 @@ If using Dockge, deploy the stack.
|
||||
Otherwise, via terminal:
|
||||
|
||||
```bash [Terminal]
|
||||
cd /docker/authentik-outpost/
|
||||
cd /srv/docker/authentik-outpost/
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
@@ -569,7 +570,7 @@ Now, let’s configure SWAG.
|
||||
Open the `authentik-server.conf` file:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/authentik-server.conf
|
||||
sudo nano /srv/docker/swag/config/nginx/authentik-server.conf
|
||||
```
|
||||
|
||||
In the file, change `authentik-server` to `authentik-outpost` as shown:
|
||||
|
||||
@@ -29,11 +29,12 @@ Arcane needs access to the Docker socket to manage containers, which is effectiv
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- docker:
|
||||
- arcane:
|
||||
- compose.yaml
|
||||
- .env
|
||||
- data/
|
||||
- srv:
|
||||
- docker:
|
||||
- arcane:
|
||||
- compose.yaml
|
||||
- .env
|
||||
- data/
|
||||
---
|
||||
::
|
||||
|
||||
@@ -61,7 +62,7 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- /docker/arcane/data:/app/data
|
||||
- /srv/docker/arcane/data:/app/data
|
||||
networks:
|
||||
- arcane-internal
|
||||
ports:
|
||||
@@ -200,7 +201,7 @@ In the Swag folders, create the file `arcane.subdomain.conf`:
|
||||
::
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/proxy-confs/arcane.subdomain.conf
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/arcane.subdomain.conf
|
||||
```
|
||||
|
||||
Paste the following configuration:
|
||||
@@ -275,7 +276,7 @@ services:
|
||||
- MANAGER_API_URL=http://10.8.0.3:3552
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /docker/arcane-agent/data:/app/data
|
||||
- /srv/docker/arcane-agent/data:/app/data
|
||||
```
|
||||
|
||||
::note
|
||||
|
||||
Reference in New Issue
Block a user