diff --git a/build-all.sh b/build-all.sh index d778a52..f4b225c 100755 --- a/build-all.sh +++ b/build-all.sh @@ -29,6 +29,8 @@ lxc-build ${SOURCE_DIR}/activemq lxc-build ${SOURCE_DIR}/ckan lxc-build ${SOURCE_DIR}/ckan-datapusher lxc-build ${SOURCE_DIR}/crisiscleanup +lxc-build ${SOURCE_DIR}/cts +lxc-build ${SOURCE_DIR}/frontlinesms lxc-build ${SOURCE_DIR}/postgres lxc-build ${SOURCE_DIR}/redis lxc-build ${SOURCE_DIR}/solr diff --git a/frontlinesms/Dockerfile b/frontlinesms/Dockerfile deleted file mode 100644 index 012face..0000000 --- a/frontlinesms/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM java -LABEL maintainer="Disassembler " - -RUN \ - # Install runtime dependencies - apk --no-cache add openjdk8-jre ttf-opensans xf86-video-dummy xorg-server \ - # Create OS user - && addgroup -S -g 8018 sms \ - && adduser -S -u 8018 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms \ - # Install FrontlineSMS - && wget http://download-frontlinesms.s3.amazonaws.com/frontlinesms2_unix_2.6.5.sh -O /tmp/frontlinesms2.sh \ - # Hackfix for Busybox gunzip - && sed -i 's/gunzip -V/echo/' /tmp/frontlinesms2.sh \ - && echo -e 'o\n\nn\nSpotter\nSpotter\n11\n45\n\n\nadmin@example.com\n\n\n\n\n\n\n\n\n\n\n' | su - sms -c 'sh /tmp/frontlinesms2.sh -c' \ - # Replace Jetty port - && sed -i 's/8130/8080/' /srv/frontlinesms/frontlinesms2/launcher.properties \ - # Cleanup - && rm /tmp/frontlinesms2.sh - -COPY docker/ / - -VOLUME ["/srv/frontlinesms/.frontlinesms2"] -EXPOSE 8080 - -CMD ["s6-svscan", "/etc/services.d"] diff --git a/frontlinesms/docker/etc/X11/dummy.conf b/frontlinesms/lxc/etc/X11/dummy.conf similarity index 100% rename from frontlinesms/docker/etc/X11/dummy.conf rename to frontlinesms/lxc/etc/X11/dummy.conf diff --git a/frontlinesms/docker/etc/services.d/.s6-svscan/finish b/frontlinesms/lxc/etc/services.d/.s6-svscan/finish similarity index 100% rename from frontlinesms/docker/etc/services.d/.s6-svscan/finish rename to frontlinesms/lxc/etc/services.d/.s6-svscan/finish diff --git a/frontlinesms/docker/etc/services.d/frontlinesms/run b/frontlinesms/lxc/etc/services.d/frontlinesms/run similarity index 100% rename from frontlinesms/docker/etc/services.d/frontlinesms/run rename to frontlinesms/lxc/etc/services.d/frontlinesms/run diff --git a/frontlinesms/docker/etc/services.d/xorg/run b/frontlinesms/lxc/etc/services.d/xorg/run similarity index 100% rename from frontlinesms/docker/etc/services.d/xorg/run rename to frontlinesms/lxc/etc/services.d/xorg/run diff --git a/frontlinesms/lxcfile b/frontlinesms/lxcfile new file mode 100644 index 0000000..4277627 --- /dev/null +++ b/frontlinesms/lxcfile @@ -0,0 +1,32 @@ +IMAGE frontlinesms +LAYER shared/alpine +LAYER shared/java +LAYER frontlinesms/frontlinesms + +RUN EOF + # Install runtime dependencies + apk --no-cache add openjdk8-jre ttf-opensans xf86-video-dummy xorg-server + + # Create OS user + addgroup -S -g 8018 sms + adduser -S -u 8018 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms + + # Install FrontlineSMS + wget http://download-frontlinesms.s3.amazonaws.com/frontlinesms2_unix_2.6.5.sh -O /tmp/frontlinesms2.sh + + # Hackfix for Busybox gunzip + sed -i 's/gunzip -V/echo/' /tmp/frontlinesms2.sh + echo -e 'o\n\nn\nSpotter\nSpotter\n11\n45\n\n\nadmin@example.com\n\n\n\n\n\n\n\n\n\n\n' | su - sms -c 'sh /tmp/frontlinesms2.sh -c' + + # Replace Jetty port + sed -i 's/8130/8080/' /srv/frontlinesms/frontlinesms2/launcher.properties + + # Cleanup + rm /tmp/frontlinesms2.sh +EOF + +COPY lxc + +MOUNT /srv/frontlinesms/data srv/frontlinesms/.frontlinesms2 + +CMD /bin/s6-svscan /etc/services.d diff --git a/frontlinesms/build.sh b/frontlinesms/setup.sh similarity index 100% rename from frontlinesms/build.sh rename to frontlinesms/setup.sh diff --git a/frontlinesms/etc/init.d/frontlinesms b/frontlinesms/setup/etc/init.d/frontlinesms similarity index 100% rename from frontlinesms/etc/init.d/frontlinesms rename to frontlinesms/setup/etc/init.d/frontlinesms diff --git a/frontlinesms/srv/frontlinesms/data/app-settings.properties b/frontlinesms/setup/srv/frontlinesms/data/app-settings.properties similarity index 100% rename from frontlinesms/srv/frontlinesms/data/app-settings.properties rename to frontlinesms/setup/srv/frontlinesms/data/app-settings.properties