Skip to content

Commit bb8afe9

Browse files
author
CoderLuii
committed
Release v0.6
1 parent d9b9297 commit bb8afe9

130 files changed

Lines changed: 14924 additions & 3663 deletions

File tree

Some content is hidden

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

Dockerfile

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,57 @@
1-
# Use alpine base image
2-
FROM python:alpine
1+
#-----------------------------------------------------------------------------
2+
# Stage 1: UI Build
3+
#-----------------------------------------------------------------------------
4+
FROM node:18-alpine AS ui-builder
35

4-
# Labels for metadata
5-
LABEL maintainer="CoderLuii"
6-
LABEL version="0.5"
7-
LABEL description="ChannelWatch - Channels DVR Monitoring Tool"
6+
WORKDIR /src
7+
COPY ui/ .
88

9-
# Set working directory
10-
WORKDIR /app
9+
RUN npm install -g pnpm
10+
RUN pnpm install
11+
RUN pnpm build
1112

12-
# Copy requirements file
13-
COPY requirements.txt .
13+
#-----------------------------------------------------------------------------
14+
# Stage 2: Application
15+
#-----------------------------------------------------------------------------
16+
FROM python:alpine
1417

15-
# Install required Python packages
16-
RUN pip install --no-cache-dir -r requirements.txt
18+
# System setup
19+
ARG UID=1000
20+
ARG GID=1000
21+
RUN addgroup -g ${GID} -S appgroup \
22+
&& adduser -u ${UID} -S appuser -G appgroup
1723

18-
# Copy the application code
19-
COPY . /app/channelwatch
24+
# Metadata
25+
LABEL maintainer="CoderLuii"
26+
LABEL version="0.7"
27+
LABEL description="ChannelWatch - Channels DVR Monitoring Tool"
2028

21-
# Create configuration directory
22-
RUN mkdir -p /config
29+
# Directory structure
30+
RUN mkdir -p /app/core \
31+
/app/ui/static_ui \
32+
/config \
33+
/etc/supervisor/conf.d/
2334

24-
# Make main.py executable
25-
RUN chmod +x /app/channelwatch/main.py
35+
WORKDIR /app
2636

27-
# Default command
28-
CMD ["python", "-m", "channelwatch.main", "--stay-alive"]
37+
# Dependencies
38+
COPY requirements.txt .
39+
RUN apk add --no-cache build-base libffi-dev tzdata grep sed su-exec \
40+
&& pip install --no-cache-dir -r requirements.txt \
41+
&& apk del build-base libffi-dev
42+
43+
# Application files
44+
COPY core/ /app/core/
45+
COPY ui/backend/config.py ui/backend/main.py ui/backend/schemas.py /app/ui/
46+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
47+
COPY --from=ui-builder /src/out /app/ui/static_ui/
48+
COPY ui/public/images /app/ui/static/images/
49+
50+
# Permissions
51+
RUN chmod +x /app/core/docker-entrypoint.sh
52+
RUN chown -R appuser:appgroup /app /config
53+
54+
# Runtime
55+
EXPOSE 8501
56+
ENTRYPOINT ["/bin/sh", "/app/core/docker-entrypoint.sh"]
57+
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ MIT License
33
Copyright (c) 2025 CoderLuii
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
6+
of this software and associated documentation files ("ChannelWatch"), to deal
77
in the Software without restriction, including without limitation the rights
88
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is

0 commit comments

Comments
 (0)