Miniflux: use config environment for container, hide pg pass
This commit is contained in:
parent
11bad22083
commit
e8669a692e
1 changed files with 5 additions and 7 deletions
|
@ -10,7 +10,7 @@ VER="${VER//./-}"
|
||||||
UPSTREAM_VER="2.2.5"
|
UPSTREAM_VER="2.2.5"
|
||||||
UPSTREAM_VER_DASH="${UPSTREAM_VER//[.+]/-}"
|
UPSTREAM_VER_DASH="${UPSTREAM_VER//[.+]/-}"
|
||||||
UPSTREAM_NAME="miniflux"
|
UPSTREAM_NAME="miniflux"
|
||||||
SERIAL="2benoitjpnet"
|
SERIAL="3benoitjpnet"
|
||||||
CNAME="$UPSTREAM_NAME-$UPSTREAM_VER_DASH-$SERIAL-$DIST-$VER"
|
CNAME="$UPSTREAM_NAME-$UPSTREAM_VER_DASH-$SERIAL-$DIST-$VER"
|
||||||
ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
||||||
|
|
||||||
|
@ -19,11 +19,9 @@ incus launch images:$IMAGE "$CNAME" --quiet
|
||||||
|
|
||||||
wait_network "$CNAME"
|
wait_network "$CNAME"
|
||||||
|
|
||||||
incus exec "$CNAME" -- bash -c 'cat >> /etc/environment << EOL
|
incus config set "$CNAME" environment.DEBIAN_FRONTEND=noninteractive
|
||||||
DEBIAN_FRONTEND=noninteractive
|
incus config set "$CNAME" environment.DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
DEBCONF_NONINTERACTIVE_SEEN=true
|
incus config set "$CNAME" environment.LC_ALL=C
|
||||||
LC_ALL=C
|
|
||||||
EOL'
|
|
||||||
incus exec "$CNAME" -- bash -c 'echo "deb [trusted=yes] https://repo.miniflux.app/apt/ * *" > /etc/apt/sources.list.d/miniflux.list'
|
incus exec "$CNAME" -- bash -c 'echo "deb [trusted=yes] https://repo.miniflux.app/apt/ * *" > /etc/apt/sources.list.d/miniflux.list'
|
||||||
incus exec "$CNAME" -- apt update
|
incus exec "$CNAME" -- apt update
|
||||||
incus exec "$CNAME" -- apt upgrade -y
|
incus exec "$CNAME" -- apt upgrade -y
|
||||||
|
@ -35,8 +33,8 @@ set +x
|
||||||
PG_PASS=$(openssl rand -hex 32)
|
PG_PASS=$(openssl rand -hex 32)
|
||||||
incus file push <(sed "s/SED_PG_PASS/$PG_PASS/" "$WORKSPACE"/miniflux.conf) \
|
incus file push <(sed "s/SED_PG_PASS/$PG_PASS/" "$WORKSPACE"/miniflux.conf) \
|
||||||
"$CNAME"/etc/miniflux.conf
|
"$CNAME"/etc/miniflux.conf
|
||||||
set -x
|
|
||||||
incus exec "$CNAME" -- bash -c "sudo -u postgres psql -c \"CREATE USER miniflux WITH PASSWORD '${PG_PASS}';\""
|
incus exec "$CNAME" -- bash -c "sudo -u postgres psql -c \"CREATE USER miniflux WITH PASSWORD '${PG_PASS}';\""
|
||||||
|
set -x
|
||||||
incus exec "$CNAME" -- bash -c 'sudo -u postgres psql -c "CREATE DATABASE miniflux OWNER miniflux;"'
|
incus exec "$CNAME" -- bash -c 'sudo -u postgres psql -c "CREATE DATABASE miniflux OWNER miniflux;"'
|
||||||
|
|
||||||
incus exec "$CNAME" -- systemctl enable miniflux
|
incus exec "$CNAME" -- systemctl enable miniflux
|
||||||
|
|
Loading…
Add table
Reference in a new issue