Skip to content

Commit 0f153bc

Browse files
committed
refactor: clean code
1 parent 0c04c5e commit 0f153bc

File tree

1,266 files changed

+15
-264743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,266 files changed

+15
-264743
lines changed

Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ MAINTAINER Doro Wu <fcwu.tw@gmail.com>
44
ENV DEBIAN_FRONTEND noninteractive
55
ENV HOME /home/ubuntu
66

7+
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list
8+
79
# built-in packages
810
RUN apt-get update \
911
&& apt-get install -y --force-yes --no-install-recommends software-properties-common curl \
@@ -28,21 +30,15 @@ RUN apt-get update \
2830
&& apt-get autoremove \
2931
&& rm -rf /var/lib/apt/lists/*
3032

31-
ADD web /web/
32-
RUN pip install setuptools wheel && pip install -r /web/requirements.txt
3333

3434
# tini for subreap
3535
ENV TINI_VERSION v0.9.0
3636
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini
3737
RUN chmod +x /bin/tini
3838

39-
ADD noVNC /noVNC/
40-
ADD nginx.conf /etc/nginx/sites-enabled/default
41-
ADD startup.sh /
42-
ADD supervisord.conf /etc/supervisor/conf.d/
43-
ADD doro-lxde-wallpapers /usr/share/doro-lxde-wallpapers/
44-
ADD gtkrc-2.0 /home/ubuntu/.gtkrc-2.0
39+
ADD image /
40+
RUN pip install setuptools wheel && pip install -r /usr/lib/web/requirements.txt
4541

46-
EXPOSE 6080
42+
EXPOSE 80
4743
WORKDIR /root
4844
ENTRYPOINT ["/startup.sh"]

README.md

Lines changed: 3 additions & 3 deletions

nginx.conf renamed to image/etc/nginx/sites-enabled/default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 6080 default_server;
2+
listen 80 default_server;
33
#listen [::]:6080 default_server ipv6only=on;
44

55
root /usr/share/nginx/html;

supervisord.conf renamed to image/etc/supervisor/conf.d/supervisord.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ redirect_stderr=true
2424
[program:x11vnc]
2525
priority=20
2626
directory=/
27-
command=x11vnc -display :1 -xkb -forever
27+
command=x11vnc -display :1 -xkb -forever -shared
2828
user=root
2929
autostart=true
3030
autorestart=true
@@ -34,8 +34,8 @@ redirect_stderr=true
3434

3535
[program:novnc]
3636
priority=25
37-
directory=/noVNC
38-
command=/noVNC/utils/launch.sh --listen 6081
37+
directory=/usr/lib/noVNC/
38+
command=/usr/lib/noVNC/utils/launch.sh --listen 6081
3939
user=root
4040
autostart=true
4141
autorestart=true
File renamed without changes.

startup.sh renamed to image/startup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ PASS=ubuntu
88
# echo "Username: ubuntu Password: $PASS"
99
id -u ubuntu &>/dev/null || useradd --create-home --shell /bin/bash --user-group --groups adm,sudo ubuntu
1010
echo "ubuntu:$PASS" | chpasswd
11+
chown -R ubuntu:ubuntu /home/ubuntu
1112
sudo -u ubuntu -i bash -c "mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \
1213
&& cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /home/ubuntu/.config/pcmanfm/LXDE/"
1314

14-
cd /web && ./run.py > /var/log/web.log 2>&1 &
15+
cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 &
1516
nginx -c /etc/nginx/nginx.conf
1617
exec /bin/tini -- /usr/bin/supervisord -n
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)