Skip to content

Commit a6c0a03

Browse files
committed
PBS Password
1 parent 28b9ab4 commit a6c0a03

File tree

3 files changed

+41
-4
lines changed

3 files changed

+41
-4
lines changed

README.md

+37-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
# pbs-docker
22
Proxmox Backup Server in Docker
33

4-
## TODO
5-
[] Sendmail
6-
[] Variabilize admin password
4+
## Why this Dockerfile ?
5+
I need to run PBS on my synology without bottleneck of NFS mount, etc.
6+
7+
This Dockerfile build a Proxmox Backup Server image.
8+
9+
It is used on my production environnement.
10+
11+
## Defaults volumes
12+
13+
### /etc/proxmox-backup
14+
Contains PBS backup
15+
16+
### /backups
17+
Backup repository
18+
19+
## Env variables
20+
21+
### MSMTP_HOST
22+
Host for relay SMTP
23+
### MSMTP_PORT
24+
SMTP of relay SMTP host
25+
### MSMTP_TLS
26+
Host SMTP is TLS ? (on, off)
27+
### MSMTP_STARTTLS
28+
Host SMTP is STARTTLS (on, off)
29+
### MSMTP_TLSCHECK
30+
Check host SMTP cert
31+
### MSMTP_AUTH
32+
Host SMTP need authentication
33+
### MSMTP_USER
34+
Host SMTP username
35+
### MSMTP_PASSWORD
36+
Host SMTP password
37+
### MSMTP_FROM
38+
Host SMTP From
39+
### PBS_ADMIN_PASSWORD
40+
PBS default password (change it after boot the container), 5 chars minimum, if less, then crash

docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ services:
1414
- MSMTP_USER
1515
- MSMTP_PASSWORD
1616
- MSMTP_FROM
17+
- PBS_ADMIN_PASSWORD
1718
ports:
1819
- "8007:8007"

docker-entrypoint.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ set -e
55
chown -R 34:34 /etc/proxmox-backup
66
chmod -R 700 /etc/proxmox-backup
77

8+
if [ -z $PBS_ADMIN_PASSWORD ]; then export PBS_ADMIN_PASSWORD=admin; fi
9+
810
#Add a user
911
if [ ! -f /etc/proxmox-backup/user.cfg ]; then
10-
proxmox-backup-manager user create admin@pbs --password admin
12+
proxmox-backup-manager user create admin@pbs --password $PBS_ADMIN_PASSWORD
1113
proxmox-backup-manager acl update / Admin --auth-id admin@pbs
1214
fi
1315

0 commit comments

Comments
 (0)