Skip to content

Commit

Permalink
update to new pixlet
Browse files Browse the repository at this point in the history
  • Loading branch information
tavdog committed Dec 4, 2024
1 parent 2511973 commit 0fa3041
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ FROM golang:latest

# ###################################
# install pixlet
ENV NODE_URL https://deb.nodesource.com/setup_16.x
ENV PIXLET_REPO https://github.com/tavdog/pixlet
ENV TDM_REPO https://github.com/tavdog/tidbyt-manager
ENV TIDBYT_APPS_REPO https://github.com/tidbyt/community
ENV NODE_URL=https://deb.nodesource.com/setup_21.x
ENV PIXLET_REPO=https://github.com/tavdog/pixlet
#ENV PIXLET_REPO_ZIP=https://github.com/tavdog/pixlet/archive/refs/heads/config_merge.zip

ENV TDM_REPO=https://github.com/tavdog/tidbyt-manager
ENV TIDBYT_APPS_REPO=https://github.com/tidbyt/community

RUN apt update && apt upgrade -y && apt install cron libwebp-dev python3-pip python3-flask python3-gunicorn -y
RUN pip3 install --break-system-packages python-dotenv paho-mqtt python-pidfile
WORKDIR /tmp
RUN curl -fsSL $NODE_URL | bash - && apt-get install -y nodejs npm && node -v
RUN curl -fsSL $NODE_URL | bash - && apt-get install -y nodejs && node -v
WORKDIR /
RUN git clone $PIXLET_REPO /pixlet
RUN git clone --depth 1 -b config_merge $PIXLET_REPO /pixlet
# RUN apt install unzip
# RUN wget $PIXLET_REPO_ZIP && unzip main.zip
# RUN mv pixlet-main pixlet
WORKDIR /pixlet
RUN npm install && npm run build && make build

Expand All @@ -35,7 +40,6 @@ RUN git clone $TIDBYT_APPS_REPO tidbyt-apps
RUN python3 ./gen_app_array.py
# install the crontab directly
RUN echo '* * * * * root cd /app ; python3 runner.py >> /app/runner.log 2>&1' > /etc/cron.d/tdmrunner
# start cron daemon
RUN /etc/init.d/cron start

# start the app
CMD ["./run"]
2 changes: 1 addition & 1 deletion run.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

/etc/init.d/cron start
# PRODUCTION
python3 -m gunicorn --config gunicorn.conf.py "tidbyt_manager:create_app()"

Expand Down

0 comments on commit 0fa3041

Please sign in to comment.