diff --git a/Dockerfile b/Dockerfile deleted file mode 120000 index 52b504a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,111 +0,0 @@ -# Built with arch: amd64 flavor: lxde image: ubuntu:18.04 localbuild: 1 -# -################################################################################ -# base system -################################################################################ - -FROM ubuntu:16.04 as system - -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* -# install debs error if combine together -RUN add-apt-repository -y ppa:fcwu-tw/apps \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc\ - vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ - && add-apt-repository -r ppa:fcwu-tw/apps \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# Additional packages require ~600MB -# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw - -# tini for subreap -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - ffmpeg \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /usr/local/ffmpeg \ - && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg - -# python library -COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python-pip python-dev build-essential \ - && pip install setuptools wheel && pip install -r /tmp/requirements.txt \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - - -################################################################################ -# builder -################################################################################ -# FROM ubuntu:18.04 as builder - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -ARG ABC -ENV PREFIX_PATH "/app" - -COPY image / - -# build frontend -COPY web /src/web -RUN /etc/install.sh - -LABEL maintainer="Tobias Stein, fcwu.tw@gmail.com" - -# COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -RUN mkdir -p /usr/local/lib/web/frontend - -RUN cp -R /src/web/dist/. /usr/local/lib/web/frontend/ - -EXPOSE 80 -WORKDIR /root -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c54c08 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,119 @@ +# Built with arch: amd64 flavor: lxde image: ubuntu:18.04 +# +################################################################################ +# base system +################################################################################ + +FROM ubuntu:18.04 as system + + +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; + +# built-in packages +ENV DEBIAN_FRONTEND noninteractive +RUN apt update \ + && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ + && apt update \ + && apt install -y --no-install-recommends --allow-unauthenticated \ + supervisor nginx sudo net-tools zenity xz-utils \ + dbus-x11 x11-utils alsa-utils \ + mesa-utils libgl1-mesa-dri \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* +# install debs error if combine together +RUN add-apt-repository -y ppa:fcwu-tw/apps \ + && apt update \ + && apt install -y --no-install-recommends --allow-unauthenticated \ + xvfb x11vnc=0.9.16-1 \ + vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ + && add-apt-repository -r ppa:fcwu-tw/apps \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +RUN apt update \ + && apt install -y --no-install-recommends --allow-unauthenticated \ + lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + + + +# Additional packages require ~600MB +# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw + +# tini for subreap +ARG TINI_VERSION=v0.18.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 /bin/tini +RUN chmod +x /bin/tini + +# ffmpeg +RUN apt update \ + && apt install -y --no-install-recommends --allow-unauthenticated \ + ffmpeg \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /usr/local/ffmpeg \ + && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg + + +# python library +COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ +RUN apt-get update \ + && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ + && apt-get install -y python-pip python-dev build-essential \ + && pip install setuptools wheel && pip install -r /tmp/requirements.txt \ + && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ + && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt + + +################################################################################ +# builder +################################################################################ +FROM ubuntu:18.04 as builder + + + +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch + +# nodejs +RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && apt-get install -y nodejs + +# yarn +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -y yarn + +# build frontend +COPY web /src/web +RUN cd /src/web \ + && yarn \ + && yarn build + + + +################################################################################ +# merge +################################################################################ +FROM system +LABEL maintainer="fcwu.tw@gmail.com" + +COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ +COPY rootfs / +RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ + chmod +x /usr/local/lib/web/frontend/static/websockify/run + +EXPOSE 80 +WORKDIR /root +ENV HOME=/home/ubuntu \ + SHELL=/bin/bash +HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health +ENTRYPOINT ["/startup.sh"] diff --git a/Dockerfile.18.04 b/Dockerfile.18.04 deleted file mode 100644 index c2ed2d3..0000000 --- a/Dockerfile.18.04 +++ /dev/null @@ -1,117 +0,0 @@ -# Built with arch: amd64 flavor: lxde image: ubuntu:18.04 localbuild: 1 -# -################################################################################ -# base system -################################################################################ - -FROM ubuntu:18.04 as system - - - -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* -# install debs error if combine together -RUN add-apt-repository -y ppa:fcwu-tw/apps \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc=0.9.16-1 \ - vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ - && add-apt-repository -r ppa:fcwu-tw/apps \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# Additional packages require ~600MB -# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw - -# tini for subreap -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - ffmpeg \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /usr/local/ffmpeg \ - && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg - -# python library -COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python-pip python-dev build-essential \ - && pip install setuptools wheel && pip install -r /tmp/requirements.txt \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - - -################################################################################ -# builder -################################################################################ -# FROM ubuntu:18.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -ENV PREFIX_PATH "/app" - -COPY image / - -# build frontend -COPY web /src/web -RUN /etc/install.sh - -LABEL maintainer="Tobias Stein, fcwu.tw@gmail.com" - -# COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -RUN mkdir -p /usr/local/lib/web/frontend - -RUN cp -R /src/web/dist/. /usr/local/lib/web/frontend/ - -EXPOSE 80 -WORKDIR /root -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index b9524f8..85101ec 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,4 +1,4 @@ -# Built with arch: amd64 flavor: lxde image: ubuntu:18.04 localbuild: 1 +# Built with arch: amd64 flavor: lxde image: ubuntu:18.04 # ################################################################################ # base system @@ -8,7 +8,7 @@ FROM ubuntu:18.04 as system -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; # built-in packages @@ -45,7 +45,7 @@ RUN apt update \ # Additional packages require ~600MB # libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw -# tini for subreap +# tini to fix subreap ARG TINI_VERSION=v0.18.0 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini RUN chmod +x /bin/tini @@ -59,7 +59,7 @@ RUN apt update \ && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg # python library -COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ +COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ RUN apt-get update \ && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ && apt-get install -y python-pip python-dev build-essential \ @@ -78,7 +78,7 @@ RUN apt-get update \ FROM ubuntu:18.04 as builder -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; RUN apt-get update \ @@ -98,7 +98,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ COPY web /src/web RUN cd /src/web \ && yarn \ - && npm run build + && yarn build @@ -109,7 +109,9 @@ FROM system LABEL maintainer="fcwu.tw@gmail.com" COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY image / +COPY rootfs / +RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ + chmod +x /usr/local/lib/web/frontend/static/websockify/run EXPOSE 80 WORKDIR /root diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 5f5f7a6..a73e556 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -# Built with arch: armhf flavor: lxde image: ubuntu:18.04 localbuild: 1 +# Built with arch: armhf flavor: lxde image: ubuntu:18.04 # ################################################################################ # base system @@ -12,7 +12,7 @@ COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/ -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; # built-in packages @@ -59,7 +59,7 @@ RUN mkdir -p /usr/local/ffmpeg \ && curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1 # python library -COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ +COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ RUN apt-get update \ && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ && apt-get install -y python-pip python-dev build-essential \ @@ -78,7 +78,7 @@ RUN apt-get update \ FROM ubuntu:18.04 as builder -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; RUN apt-get update \ @@ -111,7 +111,10 @@ FROM system LABEL maintainer="fcwu.tw@gmail.com" COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY image / +COPY rootfs / +RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run +RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ + chmod +x /usr/local/lib/web/frontend/static/websockify/run EXPOSE 80 WORKDIR /root diff --git a/Dockerfile.j2 b/Dockerfile.j2 index 8838c72..cab3753 100644 --- a/Dockerfile.j2 +++ b/Dockerfile.j2 @@ -1,4 +1,4 @@ -# Built with arch: {{ arch }} flavor: {{ flavor }} image: {{ image }} localbuild: {{localbuild }} +# Built with arch: {{ arch }} flavor: {{ flavor }} image: {{ image }} # ################################################################################ # base system @@ -13,9 +13,7 @@ FROM arm32v7/{{image}} as system COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/ {%endif%} -{% if localbuild == 1 %} -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; -{% endif %} +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; # built-in packages ENV DEBIAN_FRONTEND noninteractive @@ -81,7 +79,7 @@ RUN apt update \ # python library -COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ +COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ RUN apt-get update \ && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ && apt-get install -y python-pip python-dev build-essential \ @@ -100,7 +98,7 @@ RUN apt-get update \ FROM {{image}} as builder {% if localbuild == 1 %} -RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; {% endif %} RUN apt-get update \ @@ -120,7 +118,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ COPY web /src/web RUN cd /src/web \ && yarn \ - && npm run build + && yarn build {%if arch == "armhf"%} RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch @@ -133,7 +131,9 @@ FROM system LABEL maintainer="fcwu.tw@gmail.com" COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY image / +COPY rootfs / +RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ + chmod +x /usr/local/lib/web/frontend/static/websockify/run EXPOSE 80 WORKDIR /root diff --git a/Makefile b/Makefile index a76f15d..8c24ec4 100644 --- a/Makefile +++ b/Makefile @@ -5,15 +5,13 @@ REPO ?= dorowu/ubuntu-desktop-lxde-vnc TAG ?= latest # you can choose other base image versions IMAGE ?= ubuntu:18.04 -# use tw.archive.ubuntu.com instead of archive.ubuntu.com -LOCALBUILD ?= 1 # choose from supported flavors (see available ones in ./flavors/*.yml) FLAVOR ?= lxde # armhf or amd64 ARCH ?= amd64 # These files will be generated from teh Jinja templates (.j2 sources) -templates = Dockerfile image/etc/supervisor/conf.d/supervisord.conf +templates = Dockerfile rootfs/etc/supervisor/conf.d/supervisord.conf # Rebuild the container image build: $(templates) @@ -28,6 +26,7 @@ run: -e USER=doro -e PASSWORD=mypassword \ -e ALSADEV=hw:2,0 \ -e SSL_PORT=443 \ + -e RELATIVE_URL_ROOT=approot \ -v ${PWD}/ssl:/etc/nginx/ssl \ --device /dev/snd \ --name ubuntu-desktop-lxde-test \ diff --git a/README.md b/README.md index 89411f4..80752fb 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,19 @@ The default user is `root`. You may change the user and password respectively by docker run -p 6080:80 -e USER=doro -e PASSWORD=password -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc ``` +Deploy to a subdirectory (relative url root) +-------------------------------------------- + +You may deploy this application to a subdirectory, for example `/some-prefix/`. You then can access application by `http://127.0.0.1:6080/some-prefix/`. This can be specified using the `RELATIVE_URL_ROOT` configuration option like this + +``` +docker run -p 6080:80 -e RELATIVE_URL_ROOT=some-prefix dorowu/ubuntu-desktop-lxde-vnc +``` + +NOTE: this variable should not have any leading and trailing splash (/) + Sound (Preview version and Linux only) -------------------- +-------------------------------------- It only works in Linux. @@ -122,7 +133,6 @@ Dockerfile and configuration can be generated by template. - arch: one of `amd64` or `armhf` - flavor: refer to file in flavor/`flavor`.yml - image: base image -- localbuild: build from local that will use mirror site if set - desktop: desktop environment which is set in flavor - addon_package: Debian package to be installed which is set in flavor diff --git a/TODO b/TODO new file mode 100644 index 0000000..4165681 --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +- upgrade frontend packages +- rewrite backend by golang diff --git a/a b/a deleted file mode 100644 index e69de29..0000000 diff --git a/image/etc/RenameURL.py b/image/etc/RenameURL.py deleted file mode 100644 index 0494bec..0000000 --- a/image/etc/RenameURL.py +++ /dev/null @@ -1,23 +0,0 @@ -import os, fnmatch - -toFind = "/app" -toReplace = os.getenv("PREFIX_PATH") - -if (toReplace is None): - print("No path given by environment variable.") - exit() - -print("using path {0} ...".format(toReplace)) - -def findReplace(directory, find, replace): - print("Rename {0} into {1} at {2}".format(toFind, toReplace, directory)) - for path, dirs, files in os.walk(os.path.abspath(directory)): - for filename in files: - filepath = os.path.join(path, filename) - with open(filepath) as f: - s = f.read() - s = s.replace(find, replace) - with open(filepath, "w") as f: - f.write(s) - -findReplace("/etc/nginx/sites-enabled/", toFind, toReplace) \ No newline at end of file diff --git a/image/etc/install.sh b/image/etc/install.sh deleted file mode 100644 index 2a0f42e..0000000 --- a/image/etc/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -echo 'Building Node.js project...' -cd /src/web \ - && yarn \ - && npm run build - -cp -R /src/web/dist/. /usr/local/lib/web/frontend/ -echo 'Build finished.' \ No newline at end of file diff --git a/image/etc/nginx/sites-enabled/default b/image/etc/nginx/sites-enabled/default deleted file mode 100644 index 6f785b9..0000000 --- a/image/etc/nginx/sites-enabled/default +++ /dev/null @@ -1,54 +0,0 @@ -server { - listen 80 default_server; - # listen [::]:80 default_server ipv6only=on; - - #_SSL_PORT_#listen 443 ssl default_server; - #_SSL_PORT_#listen [::]:443 ssl default_server ipv6only=on; - #_SSL_PORT_#ssl_certificate /etc/nginx/ssl/nginx.crt; - #_SSL_PORT_#ssl_certificate_key /etc/nginx/ssl/nginx.key; - - #_HTTP_PASSWORD_#auth_basic "Private Property"; - #_HTTP_PASSWORD_#auth_basic_user_file /etc/nginx/.htpasswd; - - root /usr/local/lib/web/frontend/; - index index.html index.htm; - - location = /app { - try_files $uri @rewrites; - } - - location @rewrites { - rewrite ^(.+)$ /index.html last; - } - - location ~ ^/app/api { - try_files $uri @api; - } - - location = /app/websockify { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_buffering off; - proxy_connect_timeout 7d; - proxy_send_timeout 7d; - proxy_read_timeout 7d; - proxy_pass http://127.0.0.1:6081; - } - - location @api { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:6079; - max_ranges 0; - } - - location @proxy { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:6081; - max_ranges 0; - } -} diff --git a/rootfs/etc/nginx/sites-enabled/default b/rootfs/etc/nginx/sites-enabled/default new file mode 100644 index 0000000..fd0f442 --- /dev/null +++ b/rootfs/etc/nginx/sites-enabled/default @@ -0,0 +1,46 @@ +server { + listen 80 default_server; + # listen [::]:80 default_server ipv6only=on; + + #_SSL_PORT_#listen 443 ssl default_server; + #_SSL_PORT_#listen [::]:443 ssl default_server ipv6only=on; + #_SSL_PORT_#ssl_certificate /etc/nginx/ssl/nginx.crt; + #_SSL_PORT_#ssl_certificate_key /etc/nginx/ssl/nginx.key; + + #_HTTP_PASSWORD_#auth_basic "Private Property"; + #_HTTP_PASSWORD_#auth_basic_user_file /etc/nginx/.htpasswd; + + root /usr/local/lib/web/frontend/; + index index.html index.htm; + + location /api/ { + try_files $uri @api; + } + + location ~ /websockify$ { + #_RELATIVE_URL_ROOT_rewrite /_RELATIVE_URL_ROOT_/(.*) $1 last; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_buffering off; + proxy_connect_timeout 7d; + proxy_send_timeout 7d; + proxy_read_timeout 7d; + proxy_pass http://127.0.0.1:6081; + } + + location @api { + #_RELATIVE_URL_ROOT_rewrite /_RELATIVE_URL_ROOT_/(.*) $1 last; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_pass http://127.0.0.1:6079; + max_ranges 0; + } + + #_RELATIVE_URL_ROOT_location /_RELATIVE_URL_ROOT_/ { + #_RELATIVE_URL_ROOT_ rewrite /_RELATIVE_URL_ROOT_/(.*) /$1 last; + #_RELATIVE_URL_ROOT_ root /usr/local/lib/web/frontend/; + #_RELATIVE_URL_ROOT_} +} + diff --git a/image/etc/supervisor/conf.d/supervisord.conf b/rootfs/etc/supervisor/conf.d/supervisord.conf similarity index 79% rename from image/etc/supervisor/conf.d/supervisord.conf rename to rootfs/etc/supervisor/conf.d/supervisord.conf index 61e850f..f1dacb0 100644 --- a/image/etc/supervisor/conf.d/supervisord.conf +++ b/rootfs/etc/supervisor/conf.d/supervisord.conf @@ -7,10 +7,6 @@ directory=/root [program:nginx] priority=10 command=nginx -c /etc/nginx/nginx.conf -g 'daemon off;' -stdout_logfile=/dev/fd/1 -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/fd/1 -stderr_logfile_maxbytes=0 [program:web] priority=10 @@ -45,6 +41,10 @@ user=%USER% environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%" + + + + [program:xvfb] priority=10 command=/usr/local/bin/xvfb.sh @@ -54,10 +54,8 @@ stopsignal=KILL priority=20 command=x11vnc -display :1 -xkb -forever -shared -repeat - [program:novnc] priority=25 -directory=/usr/local/lib/web/frontend%(ENV_PREFIX_PATH)s/static/novnc -command=bash /usr/local/lib/web/frontend%(ENV_PREFIX_PATH)s/static/novnc/utils/launch.sh --listen 6081 +directory=/usr/local/lib/web/frontend/static/novnc +command=bash /usr/local/lib/web/frontend/static/novnc/utils/launch.sh --listen 6081 stopasgroup=true - diff --git a/image/etc/supervisor/conf.d/supervisord.conf.j2 b/rootfs/etc/supervisor/conf.d/supervisord.conf.j2 similarity index 100% rename from image/etc/supervisor/conf.d/supervisord.conf.j2 rename to rootfs/etc/supervisor/conf.d/supervisord.conf.j2 diff --git a/image/root/.asoundrc b/rootfs/root/.asoundrc similarity index 100% rename from image/root/.asoundrc rename to rootfs/root/.asoundrc diff --git a/image/root/.gtkrc-2.0 b/rootfs/root/.gtkrc-2.0 similarity index 100% rename from image/root/.gtkrc-2.0 rename to rootfs/root/.gtkrc-2.0 diff --git a/image/startup.sh b/rootfs/startup.sh similarity index 76% rename from image/startup.sh rename to rootfs/startup.sh index c05c6e4..dca2e48 100755 --- a/image/startup.sh +++ b/rootfs/startup.sh @@ -34,8 +34,7 @@ if [ "$USER" != "root" ]; then cp -r /root/{.gtkrc-2.0,.asoundrc} ${HOME} [ -d "/dev/snd" ] && chgrp -R adm /dev/snd fi -sed -i "s|%USER%|$USER|" /etc/supervisor/conf.d/supervisord.conf -sed -i "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf +sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf # home folder mkdir -p $HOME/.config/pcmanfm/LXDE/ @@ -60,20 +59,14 @@ if [ -n "$HTTP_PASSWORD" ]; then fi # dynamic prefix path renaming -if [ -n "$DYNAMIC_PREFIX_PATH" ]; then - PREFIX_PATH="$DYNAMIC_PREFIX_PATH" - echo "DYNAMIC_PREFIX_PATH: $PREFIX_PATH" - python /etc/RenameURL.py - /etc/install.sh - cat /etc/nginx/sites-enabled/default +if [ -n "$RELATIVE_URL_ROOT" ]; then + echo "* enable RELATIVE_URL_ROOT: $RELATIVE_URL_ROOT" + sed -i 's|#_RELATIVE_URL_ROOT_||' /etc/nginx/sites-enabled/default + sed -i 's|_RELATIVE_URL_ROOT_|'$RELATIVE_URL_ROOT'|' /etc/nginx/sites-enabled/default fi -# novnc websockify -ln -s "/usr/local/lib/web/frontend$PREFIX_PATH/static/websockify" "/usr/local/lib/web/frontend$PREFIX_PATH/static/novnc/utils/websockify" -chmod +x "/usr/local/lib/web/frontend$PREFIX_PATH/static/websockify/run" - # clearup -PASSWORD=+ +PASSWORD= HTTP_PASSWORD= -exec /bin/tini -- /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf \ No newline at end of file +exec /bin/tini -- /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf diff --git a/image/usr/local/bin/chromium-browser-sound.sh b/rootfs/usr/local/bin/chromium-browser-sound.sh similarity index 100% rename from image/usr/local/bin/chromium-browser-sound.sh rename to rootfs/usr/local/bin/chromium-browser-sound.sh diff --git a/image/usr/local/bin/xvfb.sh b/rootfs/usr/local/bin/xvfb.sh similarity index 100% rename from image/usr/local/bin/xvfb.sh rename to rootfs/usr/local/bin/xvfb.sh diff --git a/image/usr/local/lib/web/backend/config/__init__.py b/rootfs/usr/local/lib/web/backend/config/__init__.py similarity index 100% rename from image/usr/local/lib/web/backend/config/__init__.py rename to rootfs/usr/local/lib/web/backend/config/__init__.py diff --git a/image/usr/local/lib/web/backend/log/__init__.py b/rootfs/usr/local/lib/web/backend/log/__init__.py similarity index 100% rename from image/usr/local/lib/web/backend/log/__init__.py rename to rootfs/usr/local/lib/web/backend/log/__init__.py diff --git a/image/usr/local/lib/web/backend/log/config.py b/rootfs/usr/local/lib/web/backend/log/config.py similarity index 100% rename from image/usr/local/lib/web/backend/log/config.py rename to rootfs/usr/local/lib/web/backend/log/config.py diff --git a/image/usr/local/lib/web/backend/requirements.txt b/rootfs/usr/local/lib/web/backend/requirements.txt similarity index 100% rename from image/usr/local/lib/web/backend/requirements.txt rename to rootfs/usr/local/lib/web/backend/requirements.txt diff --git a/image/usr/local/lib/web/backend/run.py b/rootfs/usr/local/lib/web/backend/run.py similarity index 100% rename from image/usr/local/lib/web/backend/run.py rename to rootfs/usr/local/lib/web/backend/run.py diff --git a/image/usr/local/lib/web/backend/vnc/__init__.py b/rootfs/usr/local/lib/web/backend/vnc/__init__.py similarity index 100% rename from image/usr/local/lib/web/backend/vnc/__init__.py rename to rootfs/usr/local/lib/web/backend/vnc/__init__.py diff --git a/image/usr/local/lib/web/backend/vnc/app.py b/rootfs/usr/local/lib/web/backend/vnc/app.py similarity index 97% rename from image/usr/local/lib/web/backend/vnc/app.py rename to rootfs/usr/local/lib/web/backend/vnc/app.py index eed936b..d0a434d 100644 --- a/image/usr/local/lib/web/backend/vnc/app.py +++ b/rootfs/usr/local/lib/web/backend/vnc/app.py @@ -24,9 +24,8 @@ app = Flask('novnc2') app.config.from_object('config.Default') app.config.from_object(os.environ.get('CONFIG') or 'config.Development') -PREFIX = os.getenv("PREFIX_PATH") -@app.route(PREFIX+'/api/state') +@app.route('/api/state') @httperror def apistate(): print(url_for("apistate")) @@ -39,7 +38,7 @@ def apistate(): }) -@app.route(PREFIX+'/api/health') +@app.route('/api/health') def apihealth(): print(url_for("apihealth")) if state.health: @@ -47,7 +46,7 @@ def apihealth(): abort(503, 'unhealthy') -@app.route(PREFIX+'/api/reset') +@app.route('/api/reset') def reset(): if 'w' in request.args and 'h' in request.args: args = { @@ -72,7 +71,7 @@ def reset(): return jsonify({'code': 200}) -@app.route(PREFIX+'/api/live.flv') +@app.route('/api/live.flv') @httperror def liveflv(): def generate(): diff --git a/image/usr/local/lib/web/backend/vnc/log.py b/rootfs/usr/local/lib/web/backend/vnc/log.py similarity index 100% rename from image/usr/local/lib/web/backend/vnc/log.py rename to rootfs/usr/local/lib/web/backend/vnc/log.py diff --git a/image/usr/local/lib/web/backend/vnc/response.py b/rootfs/usr/local/lib/web/backend/vnc/response.py similarity index 100% rename from image/usr/local/lib/web/backend/vnc/response.py rename to rootfs/usr/local/lib/web/backend/vnc/response.py diff --git a/image/usr/local/lib/web/backend/vnc/state.py b/rootfs/usr/local/lib/web/backend/vnc/state.py similarity index 100% rename from image/usr/local/lib/web/backend/vnc/state.py rename to rootfs/usr/local/lib/web/backend/vnc/state.py diff --git a/image/usr/local/lib/web/backend/vnc/util.py b/rootfs/usr/local/lib/web/backend/vnc/util.py similarity index 100% rename from image/usr/local/lib/web/backend/vnc/util.py rename to rootfs/usr/local/lib/web/backend/vnc/util.py diff --git a/image/usr/local/lib/web/frontend/.gitkeep b/rootfs/usr/local/lib/web/frontend/.gitkeep similarity index 100% rename from image/usr/local/lib/web/frontend/.gitkeep rename to rootfs/usr/local/lib/web/frontend/.gitkeep diff --git a/image/usr/local/share/doro-lxde-wallpapers/bg1.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg1.jpg similarity index 100% rename from image/usr/local/share/doro-lxde-wallpapers/bg1.jpg rename to rootfs/usr/local/share/doro-lxde-wallpapers/bg1.jpg diff --git a/image/usr/local/share/doro-lxde-wallpapers/bg2.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg2.jpg similarity index 100% rename from image/usr/local/share/doro-lxde-wallpapers/bg2.jpg rename to rootfs/usr/local/share/doro-lxde-wallpapers/bg2.jpg diff --git a/image/usr/local/share/doro-lxde-wallpapers/bg3.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg3.jpg similarity index 100% rename from image/usr/local/share/doro-lxde-wallpapers/bg3.jpg rename to rootfs/usr/local/share/doro-lxde-wallpapers/bg3.jpg diff --git a/image/usr/local/share/doro-lxde-wallpapers/bg4.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg4.jpg similarity index 100% rename from image/usr/local/share/doro-lxde-wallpapers/bg4.jpg rename to rootfs/usr/local/share/doro-lxde-wallpapers/bg4.jpg diff --git a/image/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf b/rootfs/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf similarity index 100% rename from image/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf rename to rootfs/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf diff --git a/image/usr/share/applications/chromium-browser-sound.desktop b/rootfs/usr/share/applications/chromium-browser-sound.desktop similarity index 100% rename from image/usr/share/applications/chromium-browser-sound.desktop rename to rootfs/usr/share/applications/chromium-browser-sound.desktop diff --git a/web/config/index.js b/web/config/index.js index d74e596..37fabe4 100644 --- a/web/config/index.js +++ b/web/config/index.js @@ -5,26 +5,19 @@ const path = require('path') const BACKEND = process.env.BACKEND || 'http://127.0.0.1:6080' -const PREFIX_PATH = process.env.PREFIX_PATH || '/app' - -console.log(`within /config/index.js: ${process.env.PREFIX_PATH}`) - -const api_key = `${PREFIX_PATH}/api` -const websockify_key = `${PREFIX_PATH}/websockfiy` - module.exports = { dev: { // Paths assetsSubDirectory: 'static', - assetsPublicPath: '/', + assetsPublicPath: './', proxyTable: { - [api_key]: { + '/api': { target: BACKEND, changeOrigin: true, secure: false }, - [websockify_key]: { + '/websockify': { target: BACKEND, // logLevel: 'debug', ws: true, @@ -69,8 +62,8 @@ module.exports = { // Paths assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: PREFIX_PATH.substr(1)+'/static', - assetsPublicPath: '/', + assetsSubDirectory: 'static', + assetsPublicPath: './', /** * Source Maps diff --git a/web/package.json b/web/package.json index 61fa2e7..c6d06ee 100644 --- a/web/package.json +++ b/web/package.json @@ -67,6 +67,7 @@ "vue-template-compiler": "^2.5.2", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", + "webpack-cli": "^3.3.7", "webpack-dev-server": "^3.2.1", "webpack-merge": "^4.1.0" }, diff --git a/web/src/components/Vnc.vue b/web/src/components/Vnc.vue index fcaf9e5..21eb80f 100644 --- a/web/src/components/Vnc.vue +++ b/web/src/components/Vnc.vue @@ -56,7 +56,7 @@ export default { 'h': h } try { - const response = await this.$http.get(`${process.env.PREFIX_PATH}` + '/api/state', {params: params}) + const response = await this.$http.get('api/state', {params: params}) const body = response.data if (body.code !== 200) { this.stateErrorCount += 1 @@ -71,7 +71,7 @@ export default { // adaptive resolution if (!body.data.config.fixedResolution && body.data.config.sizeChangedCount === 0) { - const response = await this.$http.get(`${process.env.PREFIX_PATH}` + '/api/reset', {params: params}) + const response = await this.$http.get('api/reset', {params: params}) const body = response.data if (body.code !== 200) { this.stateErrorCount += 1 @@ -136,9 +136,7 @@ export default { // console.trace() console.log(`connecting...`) this.errorMessage = '' - let prefixName = `${process.env.PREFIX_PATH}`.substr(1) - console.log(prefixName) - let websockifyPath = prefixName + '/websockify' + let websockifyPath = 'websockify' if (force || this.vncState === 'stopped') { this.vncState = 'connecting' let hostname = window.location.hostname @@ -146,7 +144,7 @@ export default { if (!port) { port = window.location.protocol[4] === 's' ? 443 : 80 } - let url = prefixName + '/static/vnc.html?' + let url = 'static/vnc.html?' url += 'autoconnect=1&' url += `host=${hostname}&port=${port}&` url += `path=${websockifyPath}&title=novnc2&` @@ -157,7 +155,7 @@ export default { if (force || this.videoState === 'stopped') { const w = this.$refs.vncFrame.clientWidth const h = this.$refs.vncFrame.clientHeight - let url = prefixName + `/static/video.html?width=${w}&height=${h}&base=${window.location.host}` + let url = `static/video.html?width=${w}&height=${h}&base=${window.location.host}` this.$refs.videoFrame.setAttribute('src', url) this.videoState = 'connecting' } diff --git a/web/src/router/index.js b/web/src/router/index.js index f1156f1..2bd31a8 100644 --- a/web/src/router/index.js +++ b/web/src/router/index.js @@ -4,11 +4,9 @@ import Vnc from '@/components/Vnc' Vue.use(Router) -console.log(`within (router) /src/index.js: ${process.env.PREFIX_PATH}`) - export default new Router({ mode: 'history', - base: `${process.env.PREFIX_PATH}`, + base: window.location.pathname, routes: [ { path: '/', diff --git a/web/yarn.lock b/web/yarn.lock index 5e850df..af63ca3 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -186,11 +186,15 @@ ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: @@ -1225,6 +1229,10 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + caniuse-api@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" @@ -1260,6 +1268,14 @@ chai-nightwatch@~0.1.x: assertion-error "1.0.0" deep-eql "0.1.3" +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -1270,14 +1286,6 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" @@ -1388,6 +1396,14 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -1659,15 +1675,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-spawn@^5.0.1, cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0: +cross-spawn@6.0.5, cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -1677,6 +1685,14 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -1849,7 +1865,7 @@ debug@^3.1.0, debug@^3.2.5, debug@^3.2.6: dependencies: ms "^2.1.1" -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1953,6 +1969,10 @@ destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" @@ -2104,6 +2124,10 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -2118,6 +2142,14 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + enhanced-resolve@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" @@ -2474,6 +2506,12 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + dependencies: + homedir-polyfill "^1.0.1" + express@^4.16.2: version "4.16.4" resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" @@ -2695,6 +2733,15 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +findup-sync@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + flat-cache@^1.2.1: version "1.3.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" @@ -2824,6 +2871,10 @@ get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -2884,6 +2935,38 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + dependencies: + global-prefix "^3.0.0" + +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + globals@^11.0.1, globals@^11.1.0: version "11.11.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.11.0.tgz#dcf93757fa2de5486fbeed7118538adf789e9c2e" @@ -3043,6 +3126,12 @@ home-or-tmp@^2.0.0: os-homedir "^1.0.0" os-tmpdir "^1.0.1" +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + dependencies: + parse-passwd "^1.0.0" + hosted-git-info@^2.1.4: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" @@ -3212,7 +3301,7 @@ import-from@^2.1.0: dependencies: resolve-from "^3.0.0" -import-local@^2.0.0: +import-local@2.0.0, import-local@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" dependencies: @@ -3246,7 +3335,7 @@ inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" -ini@~1.3.0: +ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" @@ -3276,7 +3365,7 @@ internal-ip@^4.2.0: default-gateway "^4.0.1" ipaddr.js "^1.9.0" -interpret@^1.0.0: +interpret@1.2.0, interpret@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" @@ -3476,7 +3565,7 @@ is-url@^1.2.2: version "1.2.4" resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" -is-windows@^1.0.2: +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -3685,6 +3774,14 @@ loader-runner@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" +loader-utils@1.2.3, loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" @@ -3694,14 +3791,6 @@ loader-utils@^0.2.16: json5 "^0.5.0" object-assign "^4.0.1" -loader-utils@^1.0.2, loader-utils@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" - dependencies: - big.js "^5.2.2" - emojis-list "^2.0.0" - json5 "^1.0.1" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -3951,7 +4040,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" dependencies: @@ -4474,7 +4563,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-locale@^3.0.0: +os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" dependencies: @@ -4607,6 +4696,10 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" @@ -5424,6 +5517,10 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -5441,6 +5538,13 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" @@ -5933,6 +6037,14 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" @@ -5961,6 +6073,12 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + dependencies: + ansi-regex "^4.1.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5979,6 +6097,12 @@ supports-color@3.1.2: dependencies: has-flag "^1.0.0" +supports-color@6.1.0, supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + dependencies: + has-flag "^3.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -6001,12 +6125,6 @@ supports-color@^5.3.0, supports-color@^5.4.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - dependencies: - has-flag "^3.0.0" - svgo@^0.7.0: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" @@ -6034,6 +6152,10 @@ tapable@^0.2.7: version "0.2.9" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.9.tgz#af2d8bbc9b04f74ee17af2b4d9048f807acd18a8" +tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + tar@^4: version "4.4.8" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" @@ -6335,6 +6457,10 @@ uuid@^3.0.1, uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" +v8-compile-cache@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -6458,6 +6584,22 @@ webpack-bundle-analyzer@^2.9.0: opener "^1.4.3" ws "^4.0.0" +webpack-cli@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.7.tgz#77c8580dd8e92f69d635e0238eaf9d9c15759a91" + dependencies: + chalk "2.4.2" + cross-spawn "6.0.5" + enhanced-resolve "4.1.0" + findup-sync "3.0.0" + global-modules "2.0.0" + import-local "2.0.0" + interpret "1.2.0" + loader-utils "1.2.3" + supports-color "6.1.0" + v8-compile-cache "2.0.3" + yargs "13.2.4" + webpack-dev-middleware@^3.5.1: version "3.6.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.6.1.tgz#91f2531218a633a99189f7de36045a331a4b9cd4" @@ -6568,7 +6710,7 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.2.9, which@^1.3.0: +which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: @@ -6609,6 +6751,14 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -6666,6 +6816,13 @@ yargs-parser@^10.1.0: dependencies: camelcase "^4.1.0" +yargs-parser@^13.1.0: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" @@ -6689,6 +6846,22 @@ yargs@12.0.2: y18n "^3.2.1 || ^4.0.0" yargs-parser "^10.1.0" +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"