-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an IpfsObject interface in the ipfs dweb channel
Add Dockerfile for Cloudron [appimage] [flatpak] [docker-x11] [deploy]
- Loading branch information
cipres
authored and
cipres
committed
May 5, 2022
1 parent
d17439d
commit 2ea5e88
Showing
8 changed files
with
269 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
Xvfb $DISPLAY -ac +iglx -screen 0 $XVFB_WHD & | ||
|
||
PWD=$(date +%s | sha256sum | base64 | head -c 12) | ||
|
||
x11vnc -display $DISPLAY -listen 0.0.0.0 -shared \ | ||
-forever -passwd $PWD > /dev/null 2>&1 & | ||
|
||
echo "Container IP address:" | ||
|
||
ip a show eth0|grep 'inet' | ||
|
||
echo | ||
|
||
echo "Running healthcheck http service" | ||
|
||
hcdir=$(mktemp -d) | ||
|
||
nohup python3 -m http.server -d "${hcdir}" 8000 & | ||
|
||
cat <<EOF | ||
================================================= | ||
================================================= | ||
YOUR VNC PASSWORD IS: $PWD | ||
================================================= | ||
================================================= | ||
EOF | ||
|
||
sleep 2 | ||
|
||
fluxbox > /dev/null 2>&1 & | ||
sleep 1 | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,27 @@ | |
"contactEmail": "[email protected]", | ||
"description": "Browser for the distributed web", | ||
"changelog": "file://CHANGELOG.md", | ||
"version": "0.5.4", | ||
"healthCheckPath": "/ipfs/bafybeiahiixfpzirbz6rjjd4fkgvw7kksaigyd3fwnomrw5r3eo56ls6xm", | ||
"httpPort": 8080, | ||
"version": "0.5.5", | ||
"tagline": "Initial", | ||
"healthCheckPath": "/", | ||
"httpPort": 8000, | ||
"manifestVersion": 2, | ||
"memoryLimit": 524288000, | ||
"website": "https://galacteek.gitlab.io", | ||
"icon": "file://share/icons/galacteek-incandescent-128.png", | ||
"addons": { | ||
"localstorage": {} | ||
}, | ||
"tcpPorts": { | ||
"SSH_PORT": { | ||
"title": "SSH Tunnel for VNC", | ||
"description": "SSH Port over which tunnel can be created for VNC", | ||
"defaultValue": 5900, | ||
"containerPort": 5900 | ||
} | ||
}, | ||
"tags": [ | ||
"cloudron", | ||
"dweb", | ||
"ipfs", | ||
"qt", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Adapted by timconsidine | ||
# | ||
# https://git.cloudron.io/timconsidine/cloudron-galacteek/-/raw/master/Dockerfile | ||
|
||
FROM python:3.7-slim-buster | ||
|
||
EXPOSE 5900-5904 | ||
EXPOSE 4001 | ||
EXPOSE 8080 | ||
EXPOSE 8000 | ||
|
||
ENV NOTBIT_DIST_URL "https://gitlab.com/api/v4/projects/27627112/packages/generic/notbit/0.7/notbit.tar.gz" | ||
ENV X11VNC_PASSWORD "galacteek" | ||
ENV DEBIAN_FRONTEND "noninteractive" | ||
ENV QT_QPA_PLATFORM=xcb | ||
ENV DISPLAY=:99 | ||
ENV XVFB_WHD=1024x768x24 | ||
ENV QTWEBENGINE_DISABLE_SANDBOX=1 | ||
ENV PATH "/app/code/bin:${PATH}" | ||
# ENV QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu-compositing" | ||
|
||
# start TC added for Cloudron | ||
ENV XDG_RUNTIME_DIR "/app/data/tmp/runtime-galacteek" | ||
# end TC | ||
|
||
RUN echo "${PATH}" >> /etc/bash.bashrc | ||
|
||
RUN apt-get update && apt-get install -q -y --force-yes \ | ||
gcc git net-tools iproute2 \ | ||
libdb5.3-dev libdb-dev libdb5.3 \ | ||
file libmagic1 libmagic-mgc \ | ||
libgl1-mesa-glx libnss3 libxtst6 libxext6 \ | ||
libasound2 libegl1-mesa libpulse-mainloop-glib0 libpulse0 \ | ||
libzbar0 xvfb xorg dbus-x11 wget \ | ||
xfonts-100dpi xfonts-75dpi x11vnc fluxbox \ | ||
libxkbcommon-x11-0 libxkbcommon0 libgl1 xinit x11-xserver-utils \ | ||
libxcb-xkb1 libxcb-icccm4 libxcb-composite0 libxcb-util0 \ | ||
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \ | ||
libxcb-xinerama0 libqt5multimedia5 libqt5multimediaquick5 | ||
|
||
# start TC added for Cloudron | ||
RUN mkdir -p /app/code | ||
RUN mkdir -p /tmp/.X11-unix | ||
RUN chmod 1777 /tmp/.X11-unix | ||
WORKDIR /app/code | ||
# end TC | ||
|
||
# Get ipfs binary | ||
RUN wget http://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-amd64.tar.gz && \ | ||
tar -xvf go-ipfs_v0.9.1_linux-amd64.tar.gz && \ | ||
cp go-ipfs/ipfs /app/code/bin && cp go-ipfs/ipfs /usr/bin && \ | ||
rm go-ipfs_v0.9.1_linux-amd64.tar.gz | ||
|
||
# Add source code. | ||
COPY README.rst COPYING LICENSE LICENSE.go-ipfs \ | ||
requirements*.txt setup.py galacteek.pro \ | ||
/app/code/galacteek/ | ||
|
||
COPY share /app/code/galacteek/share | ||
COPY galacteek/ /app/code/galacteek/galacteek | ||
|
||
COPY requirements.txt requirements-dev.txt \ | ||
requirements-extra-markdown.txt \ | ||
requirements-rdf-bsddb.txt \ | ||
requirements-ui-pyqt-5.15.txt \ | ||
./ | ||
|
||
RUN pip install -U pip wheel && pip install -r requirements.txt && \ | ||
pip install -r requirements-dev.txt && \ | ||
pip install -r requirements-extra-markdown.txt && \ | ||
pip install -r requirements-rdf-bsddb.txt && \ | ||
pip install -r requirements-ui-pyqt-5.15.txt | ||
|
||
RUN cd /app/code/galacteek && \ | ||
python setup.py build build_docs install && \ | ||
rm -f requirements*.txt | ||
|
||
RUN apt-get remove -y gcc perl | ||
|
||
RUN ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 \ | ||
/usr/lib/x86_64-linux-gnu/libxcb-util.so.1 | ||
|
||
RUN wget ${NOTBIT_DIST_URL} && \ | ||
tar -C /usr/bin -xvf notbit.tar.gz && \ | ||
rm notbit.tar.gz | ||
|
||
# start TC added for Cloudron | ||
RUN mkdir -p /app/data | ||
RUN mkdir -p /app/data/.X-11-unix | ||
RUN mkdir -p /app/data/tmp/runtime-galacteek | ||
RUN mkdir -p /app/data/.local | ||
RUN mkdir -p /app/data/.local/share | ||
RUN mkdir -p /app/data/.local/share/galacteek | ||
RUN mkdir -p /app/data/.local/share/galacteek/main | ||
RUN mkdir -p /app/data/.local/share/galacteek/main/mhashmetadb | ||
RUN useradd -m -u 1000 -d /app/data galacteek | ||
RUN chown -R galacteek /app/data | ||
# end TC | ||
|
||
COPY .docker/x11vnc_cloudron_start.sh / | ||
RUN chmod +x /x11vnc_cloudron_start.sh | ||
USER galacteek | ||
CMD ["/x11vnc_cloudron_start.sh", "galacteek", "--config-ipfs-auto", "-d"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters