create admin user automatically
Visas pārbaudes ir veiksmīgas
continuous-integration/drone/push Build is passing

Šī revīzija ir iekļauta:
2020-03-22 05:51:17 -07:00
vecāks fb2bf698ca
revīzija d5e258ff01
3 mainīti faili ar 13 papildinājumiem un 0 dzēšanām

Parādīt failu

@@ -3,6 +3,8 @@ FROM ubuntu:bionic
ENV DEBIAN_FRONTEND noninteractive
ENV DEFAULT_ADMIN_PASSWORD hunter2
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
RUN echo "deb $UBUNTU_MIRROR bionic main universe restricted multiverse" > /etc/apt/sources.list.new && \

Parādīt failu

@@ -23,6 +23,13 @@ on 20.04 but its build file doesn't work with modern `scons`, sadly.
# Docker Image Information
* env:
* `DEFAULT_ADMIN_PASSWORD`: set to the admin password you want for the
`admin` user. default: `hunter2`. Note that passwords are stored
unhashed in plaintext on disk (take it up with the duck, I just
packaged it)
* no-op if `/config/users.txt` already exists, which it will after
first run.
* state/config volume: `/config`
* logs to stdout like a good docker

Parādīt failu

@@ -15,5 +15,9 @@ if [[ ! -d /config/certs ]]; then
bash /usr/local/src/adchpp/linux/generate_certs.sh
fi
if [[ ! -e /config/users.txt ]]; then
echo "[{\"password\":\"$DEFAULT_ADMIN_PASSWORD\",\"nick\":\"admin\",\"level\":10,\"regby\":\"admin\",\"regtime\":1322835912}]" > /config/users.txt
fi
cd /config
exec /usr/local/bin/adchppd -c /config