App done
This commit is contained in:
parent
9966f67393
commit
667799fdd4
4 changed files with 15 additions and 20 deletions
|
@ -2,7 +2,7 @@
|
|||
"version": "0.1.0",
|
||||
"id": "eriktad.prometheus.cloudronapp",
|
||||
"author": "Erik Tadevosyan",
|
||||
"healthCheckPath": "healthcheck",
|
||||
"healthCheckPath": "/healthcheck",
|
||||
"httpPort": 8000,
|
||||
"icon": "logo.png",
|
||||
"addons": {
|
||||
|
|
12
Dockerfile
12
Dockerfile
|
@ -1,6 +1,11 @@
|
|||
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 8000
|
||||
|
||||
RUN mkdir -p /app/data/runtime /app/data/config && \
|
||||
chown -R cloudron:cloudron /app/data/runtime /app/data/config
|
||||
|
||||
WORKDIR /app/data
|
||||
|
||||
# configure apache
|
||||
RUN rm /etc/apache2/sites-enabled/*
|
||||
|
@ -17,7 +22,10 @@ RUN mkdir -p /usr/local/bin/prometheus && \
|
|||
tar xvfz prometheus-*.tar.gz && \
|
||||
rm -rf prometheus-*.tar.gz && \
|
||||
mv prometheus-*/* prometheus && \
|
||||
rm -rf prometheus-*
|
||||
rm -rf prometheus-* && \
|
||||
chown -R cloudron:cloudron prometheus
|
||||
|
||||
RUN sudo -u cloudron cp -n /usr/local/bin/prometheus/prometheus.yml /app/data/config/prometheus.yml
|
||||
|
||||
COPY start.sh /app/pkg/
|
||||
|
||||
|
|
|
@ -33,14 +33,4 @@
|
|||
RewriteRule "/healthcheck" - [R=200]
|
||||
</Location>
|
||||
|
||||
<Location /healthz>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Satisfy Any
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyErrorOverride Off
|
||||
ProxyPass http://127.0.0.1:9090/
|
||||
</Location>
|
||||
|
||||
</VirtualHost>
|
||||
|
|
11
start.sh
11
start.sh
|
@ -1,15 +1,12 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -eu
|
||||
|
||||
echo "=> Starting apache"
|
||||
APACHE_CONFDIR="" source /etc/apache2/envvars
|
||||
rm -f "${APACHE_PID_FILE}"
|
||||
/usr/sbin/apache2 -DFOREGROUND
|
||||
|
||||
echo "=> Ensure permissions"
|
||||
chown -R cloudron:cloudron /usr/local/bin/prometheus
|
||||
/usr/sbin/apache2 -DFOREGROUND &
|
||||
|
||||
echo "=> Starting Prometheus"
|
||||
cd /usr/local/bin/prometheus
|
||||
./prometheus --config.file=prometheus.yml
|
||||
exec /usr/local/bin/gosu cloudron:cloudron ./prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime
|
Loading…
Reference in a new issue