Skip to content

Commit

Permalink
Merge pull request #40 from IngmarStein/master
Browse files Browse the repository at this point in the history
Various Docker workflow improvements
  • Loading branch information
tavdog authored Feb 8, 2025
2 parents ab29287 + 2bcc16f commit 6a1ff90
Show file tree
Hide file tree
Showing 1,029 changed files with 42 additions and 332,263 deletions.
12 changes: 10 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
.venv
.vscode
.dockerignore
.env.example
.git
.github
.gitignore
.pytest_cache
.trunk
.venv
.vscode
Dockerfile
docker-compose.yaml
README.md
tests
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@ jobs:
latest=true
prefix=
suffix=
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build and push Docker image
id: push
uses: docker/[email protected]
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
**/*.json
**/*.log
.env
env
**/system-apps/**
system-apps/**
firmware/*.bin
users/*.idx
/system-apps
users/usersdb.sqlite

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && apt-get install --no-install-recommends -y procps libwebp7 libwebpdemux2 libwebpmux3 git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp

# Copy the built pixlet binary from the builder stage
COPY --from=builder /pixlet/pixlet /pixlet/pixlet
Expand All @@ -27,6 +26,7 @@ COPY --from=builder /pixlet/pixlet /pixlet/pixlet
WORKDIR /app
COPY . /app
RUN pip install --no-cache-dir -r requirements.txt
RUN rm -f requirements.txt

# 8000 for main app, 5100,5102 for pixlet serve iframe
EXPOSE 8000 5100 5101
Expand Down
8 changes: 5 additions & 3 deletions clone_system_apps_repo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# clone system repo and generate the apps.json list. will pullapp descrption pulled from the yaml if available
import json,os,sys,subprocess,shutil
import json
import os
import subprocess
import shutil

system_apps_path = "system-apps"
system_apps_repo = os.environ.get('SYSTEM_APPS_REPO') or "https://github.com/tavdog/tronbyt-apps.git"
Expand All @@ -11,8 +14,7 @@
[
"git",
"pull",
"--rebase",
"true"
"--rebase=true"
],
cwd=system_apps_path
)
Expand Down
19 changes: 19 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "${SERVER_PORT}:8000" # Map port 8000 on the host to port 8000 in the container
- "${PIXLET_SERVE_PORT1}:5100" # 5100 is used for pixlet serve interface during app configuration
- "${PIXLET_SERVE_PORT2}:5101" # user 2
volumes:
- .:/app # for development
- "/etc/localtime:/etc/localtime:ro" # used to sync docker with host time
environment:
- SERVER_HOSTNAME=${SERVER_HOSTNAME_OR_IP:?SERVER_HOSTNAME_OR_IP MUST BE SET IN .env FILE !!!!!!!!!!!!!!!!!.}
- SERVER_PORT=${SERVER_PORT}
- PIXLET_RENDER_PORT1=${PIXLET_SERVE_PORT1}
- PYTHONUNBUFFERED=1
- SYSTEM_APPS_REPO=${SYSTEM_APPS_REPO}
- PRODUCTION=${PRODUCTION}
5 changes: 1 addition & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
services:
web:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/tavdog/tronbyt-server:latest
ports:
- "${SERVER_PORT}:8000" # Map port 8000 on the host to port 8000 in the container
- "${PIXLET_SERVE_PORT1}:5100" # 5100 is used for pixlet serve interface during app configuration
- "${PIXLET_SERVE_PORT2}:5101" # user 2
volumes:
#- .:/app # for development
- "/etc/localtime:/etc/localtime:ro" # used to sync docker with host time
environment:
- SERVER_HOSTNAME=${SERVER_HOSTNAME_OR_IP:?SERVER_HOSTNAME_OR_IP MUST BE SET IN .env FILE !!!!!!!!!!!!!!!!!.}
Expand Down
247 changes: 0 additions & 247 deletions env/bin/Activate.ps1

This file was deleted.

Loading

0 comments on commit 6a1ff90

Please sign in to comment.