Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions observium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN sed -i -e 's#\(bind-address.*=\).*#\1 127.0.0.1#g' /etc/mysql/mariadb.conf.d
echo '[mysqld]' > /etc/mysql/conf.d/innodb_file_per_table.cnf && \
echo 'innodb_file_per_table' >> /etc/mysql/conf.d/innodb_file_per_table.cnf

RUN mkdir -p /opt/observium/firstrun /opt/observium/logs /opt/observium/rrd /config && \
RUN mkdir -p /opt/observium/firstrun /opt/observium/logs /opt/observium/rrd /opt/observium/certificates /config && \
cd /opt && \
wget http://www.observium.org/observium-community-latest.tar.gz && \
tar zxvf observium-community-latest.tar.gz && \
Expand All @@ -69,6 +69,7 @@ RUN chown nobody:users /opt/observium/update/184.sql && \
chmod 755 /opt/observium/update/184.sql

RUN a2enmod rewrite
RUN a2enmod ssl

RUN mkdir /etc/service/apache2
COPY apache2.sh /etc/service/apache2/run
Expand Down Expand Up @@ -113,7 +114,7 @@ COPY observium.conf /etc/syslog-ng/conf.d/observium.conf
EXPOSE 514/udp
EXPOSE 8668/tcp

VOLUME ["/config","/opt/observium/logs","/opt/observium/rrd"]
VOLUME ["/config","/opt/observium/logs","/opt/observium/rrd","/opt/observium/certificates"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it should need another volume mapping just for the certificates.

Ideally, it should use Let's Encrypt's Certbot to automatically provision a certificate. DNS-01 challenges could make sense since I don't have my Observium exposed to the Internet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just how I had setup my environment. A separate directory is not necessary. I manage my own internal CA and do not expose Observium to the internet. The DNS-01 challenges from LetEncrypt should certainly work.


# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4 changes: 4 additions & 0 deletions observium/apache-observium
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
LogLevel warn
CustomLog /opt/observium/logs/access_log combined
ServerSignature On
SSLEngine On
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding HTTPS is fine but HTTP should still work. There should be a new virtual host on a different port for TLS.

SSLCertificateFile /opt/observium/certificates/apache.pem
SSLCertificateKeyFile /opt/observium/certificates/apache.key
SSLCertificateChainFile /opt/observium/certificates/apache-chain.pem
</VirtualHost>