Skip to content
Permalink
Browse files

added docker

  • Loading branch information
BitDesert committed Apr 20, 2018
1 parent 96377ff commit 4569a9502e554f9718cc4cef59c59a613be01574
Showing with 41 additions and 0 deletions.
  1. +2 −0 .dockerignore
  2. +17 −0 Dockerfile
  3. +22 −0 entry.sh
@@ -0,0 +1,2 @@
.*
*.md
@@ -0,0 +1,17 @@
# apache with php base image
FROM php:7.2-apache

# copy all contents to public html
COPY . /var/www/html

# cleanup as we don't have a seperate public folder
RUN rm /var/www/html/Dockerfile /var/www/html/entry.sh

# entry shell
COPY entry.sh /entry.sh

# make it executable
RUN chmod +x /entry.sh

# go for it!
CMD ["/bin/bash", "/entry.sh"]
@@ -0,0 +1,22 @@
#!/bin/bash

# set the config directory
monitordir="/opt/nanoNodeMonitor"

# create config dir
mkdir -p "${monitordir}"

# check for config file
if [ ! -f "${monitordir}/config.php" ]; then
echo "Config File not found, adding default."
cp "/var/www/html/modules/config.sample.php" "${monitordir}/config.php"
fi

# create config symlink
ln -s $monitordir/config.php /var/www/html/modules/config.php

# change folder rights so www-data can read
chmod 755 /opt

# start apache
apache2-foreground

0 comments on commit 4569a95

Please sign in to comment.
You can’t perform that action at this time.