Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Update readme, finish restructures.
Browse files Browse the repository at this point in the history
  • Loading branch information
setiseta committed May 31, 2015
1 parent 6fc5380 commit eb1ac18
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 47 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ENV HOME=/root \
COPY init.sh /etc/my_init.d/init.sh
COPY apache2.sh /etc/service/apache2/run
COPY cron-observium /etc/cron.d/observium
#COPY initdb.sh /etc/my_init.d/initdb.sh

# Use baseimage-docker's init system
CMD ["/sbin/my_init"]
Expand All @@ -27,7 +26,7 @@ RUN \
locale-gen de_DE.UTF-8 && locale-gen en_US.UTF-8 && \
apt-get update -q && \
apt-get install -y --no-install-recommends \
libapache2-mod-php5 php5-cli php5-json wget unzip software-properties-common pwgen \
mysql-client libapache2-mod-php5 php5-cli php5-json wget unzip software-properties-common \
php5-mysql php5-gd php5-mcrypt python-mysqldb rrdtool subversion whois mtr-tiny at \
nmap ipmitool graphviz imagemagick php5-snmp php-pear snmp graphviz fping libvirt-bin && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
Expand Down Expand Up @@ -57,5 +56,4 @@ COPY apache-observium /etc/apache2/sites-available/000-default.conf

EXPOSE 80/tcp

#VOLUME ["/config","/opt/observium/logs","/opt/observium/rrd"]
VOLUME ["/data"]
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,25 @@ Environment Vars
- **TZ**: Set timezone. Defaults to `UTC`

---
Convert from older version with integrated DB to new
Convert from older version with integrated DB to new container
===

- we use "ocontainer" as container name. replace it with your name.
```
mkdir mysql
docker exec -it ocontainer mysqldump observium > mysql/observiumdb.sql
mkdir data
mv config data/ && mv rrd data/ && mv logs data/
chown nobody:users data -R
```
- now run your db container, we use the example from above, then run this command (observium-db is the container name)
```
echo "#!/bin/bash" > mysql/import.sh
echo "mysql -u observium -pobserviumpwd observium < /var/lib/mysql/observiumdb.sql" >> mysql/import.sh
chmod 0755 mysql/import.sh
docker exec -it observium-db bash /var/lib/mysql/import.sh
rm -f mysql/import.sh mysql/observiumdb.sql
```
- now run your observium container, like the example from above

---
Credits
Expand Down
1 change: 0 additions & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ DB_PORT=${DB_PORT:-}
DB_NAME=${DB_NAME:-}
DB_USER=${DB_USER:-}
DB_PASS=${DB_PASS:-}
DB_POOL=${DB_POOL:-10}

if [ -n "${MYSQL_PORT_3306_TCP_ADDR}" ]; then
DB_TYPE=${DB_TYPE:-mysql}
Expand Down
41 changes: 0 additions & 41 deletions initdb.sh

This file was deleted.

0 comments on commit eb1ac18

Please sign in to comment.