Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.

Commit

Permalink
upgrade unms to 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed Oct 2, 2018
1 parent b49de61 commit e889191
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Multi-stage build - See https://docs.docker.com/engine/userguide/eng-image/multistage-build
FROM ubnt/unms:0.12.2 as unms
FROM oznu/s6-node:8.11.3-amd64
FROM ubnt/unms:0.13.0 as unms
FROM oznu/s6-node:8.12.0-amd64

# base deps redis, rabbitmq
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
Expand All @@ -13,8 +13,8 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/reposit
&& chmod -R 777 /var/lib/rabbitmq /etc/rabbitmq \
&& ln -sf /var/lib/rabbitmq/.erlang.cookie /root/

# postgres 9.6.9
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/main postgresql==9.6.9-r0 postgresql-client=9.6.9-r0 libpq=9.6.9-r0
# postgres 9.6.10 https://pkgs.alpinelinux.org/packages?name=postgresql&branch=v3.6
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/main postgresql==9.6.10-r0 postgresql-client=9.6.10-r0 postgresql-contrib=9.6.10-r0 libpq=9.6.10-r0

# start ubnt/unms dockerfile #
RUN mkdir -p /home/app/unms
Expand Down Expand Up @@ -45,9 +45,9 @@ ENV NGINX_UID=1000 \
NGINX_VERSION=nginx-1.12.2 \
LUAJIT_VERSION=2.1.0-beta3

RUN devDeps="wget openssl-dev pcre-dev zlib-dev build-base libffi-dev python-dev build-base" \
&& apk del libressl-dev curl-dev libssh2-dev \
&& apk add --no-cache --update ${devDeps} sudo dumb-init openssl pcre libgcc gettext py-pip \
RUN set -x && devDeps="wget pcre-dev zlib-dev build-base libffi-dev python-dev build-base" \
# && apk del libressl-dev curl-dev libssh2-dev \
&& apk add --no-cache --update ${devDeps} sudo dumb-init pcre libgcc gettext py-pip \
&& pip install certbot==0.21.0 \
&& mkdir -p /tmp/src && cd /tmp/src \
&& wget -q http://nginx.org/download/${NGINX_VERSION}.tar.gz -O nginx.tar.gz \
Expand Down Expand Up @@ -98,13 +98,15 @@ RUN devDeps="wget openssl-dev pcre-dev zlib-dev build-base libffi-dev python-dev
&& echo "unms ALL=(ALL) NOPASSWD: /usr/sbin/nginx -s *" >> /etc/sudoers \
&& echo "unms ALL=(ALL) NOPASSWD:SETENV: /copy-user-certs.sh reload" >> /etc/sudoers

ADD https://github.com/Ubiquiti-App/UNMS/archive/v0.12.2.tar.gz /tmp/unms.tar.gz
ADD https://github.com/Ubiquiti-App/UNMS/archive/v0.13.0.tar.gz /tmp/unms.tar.gz

RUN cd /tmp \
&& tar -xzf unms.tar.gz \
&& cd UNMS-*/src/nginx \
&& cp *.sh *.conf.template openssl.cnf 502.html / \
&& chmod +x /entrypoint.sh /cert.sh /letsencrypt.sh /fill-template.sh /copy-user-certs.sh
&& cp entrypoint.sh refresh-certificate.sh fill-template.sh openssl.cnf *.conf.template / \
&& mkdir -p /www/public \
&& cp -R public /www/ \
&& chmod +x /entrypoint.sh /fill-template.sh /refresh-certificate.sh
# end ubnt/nginx docker file #

ENV PATH=/home/app/unms/node_modules/.bin:$PATH \
Expand Down
23 changes: 13 additions & 10 deletions Dockerfile.raspberry-pi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Multi-stage build - See https://docs.docker.com/engine/userguide/eng-image/multistage-build
FROM ubnt/unms:0.12.2 as unms
FROM oznu/s6-node:8.11.3-armhf
FROM ubnt/unms:0.13.0 as unms
FROM oznu/s6-node:8.12.0-armhf

# base deps redis, rabbitmq
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
Expand All @@ -13,8 +13,8 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/reposit
&& chmod -R 777 /var/lib/rabbitmq /etc/rabbitmq \
&& ln -sf /var/lib/rabbitmq/.erlang.cookie /root/

# postgres 9.6.9
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/main postgresql==9.6.9-r0 postgresql-client=9.6.9-r0 libpq=9.6.9-r0
# postgres 9.6.10 https://pkgs.alpinelinux.org/packages?name=postgresql&branch=v3.6
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/main postgresql==9.6.10-r0 postgresql-client=9.6.10-r0 postgresql-contrib=9.6.10-r0 libpq=9.6.10-r0

# start ubnt/unms dockerfile #
RUN mkdir -p /home/app/unms
Expand Down Expand Up @@ -45,9 +45,9 @@ ENV NGINX_UID=1000 \
NGINX_VERSION=nginx-1.12.2 \
LUAJIT_VERSION=2.1.0-beta3

RUN devDeps="wget openssl-dev pcre-dev zlib-dev build-base libffi-dev python-dev build-base" \
&& apk del libressl-dev curl-dev libssh2-dev \
&& apk add --no-cache --update ${devDeps} sudo dumb-init openssl pcre libgcc gettext py-pip \
RUN set -x && devDeps="wget pcre-dev zlib-dev build-base libffi-dev python-dev build-base" \
# && apk del libressl-dev curl-dev libssh2-dev \
&& apk add --no-cache --update ${devDeps} sudo dumb-init pcre libgcc gettext py-pip \
&& pip install certbot==0.21.0 \
&& mkdir -p /tmp/src && cd /tmp/src \
&& wget -q http://nginx.org/download/${NGINX_VERSION}.tar.gz -O nginx.tar.gz \
Expand Down Expand Up @@ -98,19 +98,22 @@ RUN devDeps="wget openssl-dev pcre-dev zlib-dev build-base libffi-dev python-dev
&& echo "unms ALL=(ALL) NOPASSWD: /usr/sbin/nginx -s *" >> /etc/sudoers \
&& echo "unms ALL=(ALL) NOPASSWD:SETENV: /copy-user-certs.sh reload" >> /etc/sudoers

ADD https://github.com/Ubiquiti-App/UNMS/archive/v0.12.2.tar.gz /tmp/unms.tar.gz
ADD https://github.com/Ubiquiti-App/UNMS/archive/v0.13.0.tar.gz /tmp/unms.tar.gz

RUN cd /tmp \
&& tar -xzf unms.tar.gz \
&& cd UNMS-*/src/nginx \
&& cp *.sh *.conf.template openssl.cnf 502.html / \
&& chmod +x /entrypoint.sh /cert.sh /letsencrypt.sh /fill-template.sh /copy-user-certs.sh
&& cp entrypoint.sh refresh-certificate.sh fill-template.sh openssl.cnf *.conf.template / \
&& mkdir -p /www/public \
&& cp -R public /www/ \
&& chmod +x /entrypoint.sh /fill-template.sh /refresh-certificate.sh
# end ubnt/nginx docker file #

ENV PATH=/home/app/unms/node_modules/.bin:$PATH \
PGDATA=/config/postgres \
POSTGRES_DB=unms \
QUIET_MODE=0 \
WS_PORT=443 \
PUBLIC_HTTPS_PORT=443 \
PUBLIC_WS_PORT=443 \
SECURE_LINK_SECRET=enigma \
Expand Down
1 change: 1 addition & 0 deletions root/etc/services.d/nginx/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export UNMS_HTTP_PORT=8081
export UNMS_WS_PORT=8082
export UNMS_WS_SHELL_PORT=8083
export UNMS_WS_API_PORT=8084
export UNMS_HOST=localhost

echo "Starting nginx..."

Expand Down

0 comments on commit e889191

Please sign in to comment.