You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced-config/README.md
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,66 @@
1
1
# Advanced Configuration
2
2
3
+
## Docker Secrets
4
+
5
+
This image supports the use of Docker secrets to import from file and keep sensitive usernames or passwords from being passed or preserved in plaintext.
6
+
7
+
You can set any environment variable from a file by appending `__FILE` (double-underscore FILE) to the environmental variable name.
8
+
9
+
```yml
10
+
version: "3.7"
11
+
12
+
secrets:
13
+
# Secrets are single-line text files where the sole content is the secret
14
+
# Paths in this example assume that secrets are kept in local folder called ".secrets"
15
+
DB_ROOT_PWD:
16
+
file: .secrets/db_root_pwd.txt
17
+
MYSQL_PWD:
18
+
file: .secrets/mysql_pwd.txt
19
+
20
+
services:
21
+
app:
22
+
image: 'jc21/nginx-proxy-manager:latest'
23
+
restart: always
24
+
ports:
25
+
# Public HTTP Port:
26
+
- '80:80'
27
+
# Public HTTPS Port:
28
+
- '443:443'
29
+
# Admin Web Port:
30
+
- '81:81'
31
+
environment:
32
+
# These are the settings to access your db
33
+
DB_MYSQL_HOST: "db"
34
+
DB_MYSQL_PORT: 3306
35
+
DB_MYSQL_USER: "npm"
36
+
# DB_MYSQL_PASSWORD: "npm" # use secret instead
37
+
DB_MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
38
+
DB_MYSQL_NAME: "npm"
39
+
# If you would rather use Sqlite uncomment this
40
+
# and remove all DB_MYSQL_* lines above
41
+
# DB_SQLITE_FILE: "/data/database.sqlite"
42
+
# Uncomment this if IPv6 is not enabled on your host
0 commit comments