Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
#!/bin/bash

set -o errexit

# init /srv if empty
DIST_FILE=/srv/pmm-distribution
if [ ! -f $DIST_FILE ]; then
echo "File $DIST_FILE doesn't exist. Initizlize /srv..."
echo docker > $DIST_FILE
mkdir -p /srv/{clickhouse,grafana,logs,postgres,prometheus,nginx,victoriametrics}
Comment thread
nikita-b marked this conversation as resolved.
chown grafana:grafana /srv/grafana
chown pmm:pmm /srv/{victoriametrics,prometheus,logs}
chown postgres:postgres /srv/postgres
echo "Generate self-signed certificates for nginx"
bash /var/lib/cloud/scripts/per-boot/generate-ssl-certificate
Comment thread
denisok marked this conversation as resolved.
echo "Init Postgres"
su postgres -c "/usr/pgsql-11/bin/initdb -D /srv/postgres"
fi
Comment thread
denisok marked this conversation as resolved.

# pmm-managed-init validates environment variables.
pmm-managed-init

Expand Down