Commit ce40292d authored by Felix Bartels's avatar Felix Bartels

cleanup

use fixed paths
rename .env to environment
  .env does not seem to be used anyways, and this way its easier to find for admins
Signed-off-by: Felix Bartels's avatarFelix Bartels <felix@host-consultants.de>
parent 3395d352
......@@ -11,7 +11,7 @@ RUN apt-get update && \
rm -rf /var/cache/apt /var/lib/apt/lists
WORKDIR /app/pkg
ARG STATPING_VERSION=0.90.40
ARG STATPING_VERSION=0.90.42
RUN curl -L https://github.com/statping/statping/releases/download/v$STATPING_VERSION/statping-linux-amd64.tar.gz | tar -xz -f - && \
echo "Statping is verion $(/app/pkg/statping version)"
......
......@@ -16,12 +16,11 @@ random_string() {
LC_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c32
}
# TODO check why ADMIN_PASSWORD and API_SECRET do not work
# ADMIN_PASSWORD seems to only work with >v0.90.40 (which is not yet released)
if [ ! -e .env ]; then
cat <<-EOF > "./.env"
if [ ! -e /app/data/environment ]; then
cat <<-EOF > "/app/data/environment"
# Config file to load
NAME="Cloudron"
DESCRIPTION="Status overview"
#USE_CDN=false
DISABLE_LOGS=false
ALLOW_REPORTS=false
......@@ -30,10 +29,13 @@ API_SECRET=$(random_string)
EOF
fi
source .env
# export all values from "environment"
set -a
. /app/data/environment
set +x
if [ ! -e services.yml ]; then
cat <<-EOF > "./services.yml"
if [ ! -e /app/data/services.yml ]; then
cat <<-EOF > "/app/data/services.yml"
x-tcpservice: &tcpservice
type: tcp
check_interval: 60
......@@ -74,7 +76,4 @@ services:
EOF
fi
# the credentials for the postgres database are changing, but statping stores them in config.yml and wants to reuse old credentials
#rm /app/data/config.yml
exec /app/pkg/statping
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment