Migrate from gitea
This commit is contained in:
commit
9cc4e80c30
5 changed files with 131 additions and 0 deletions
27
.dockerignore
Normal file
27
.dockerignore
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
**/__pycache__
|
||||
**/.venv
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.vscode/
|
||||
43
Dockerfile
Normal file
43
Dockerfile
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# For more information, please refer to https://aka.ms/vscode-docker-python
|
||||
# Use the official Nginx image from Docker Hub
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
# Copy static files (optional)
|
||||
#COPY html/ /usr/share/nginx/html/
|
||||
|
||||
# Expose ports (default is 80 for HTTP and 443 for HTTPS)
|
||||
EXPOSE 80
|
||||
|
||||
# Keeps Python from generating .pyc files in the container
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Turns off buffering for easier container logging
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -y --no-install-recommends python3-pip
|
||||
|
||||
RUN apt-get install -y --no-install-recommends systemctl procps
|
||||
RUN apt-get install -y --no-install-recommends lighttpd
|
||||
|
||||
RUN lighty-enable-mod cgi
|
||||
|
||||
# Copy custom configuration file (optional)
|
||||
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||
COPY service-menu.sh /var/www/html/service-menu.sh
|
||||
|
||||
RUN pip install bscpylgtv --break-system-packages
|
||||
|
||||
CMD ["/bin/bash", "systemctl start lighttpd"]
|
||||
|
||||
#WORKDIR /app
|
||||
#COPY . /app
|
||||
|
||||
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
|
||||
#RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
||||
#USER appuser
|
||||
|
||||
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
|
||||
#CMD ["python", "-m", "myapp.manage"]
|
||||
58
lighttpd.conf
Normal file
58
lighttpd.conf
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
server.modules = (
|
||||
"mod_indexfile",
|
||||
"mod_access",
|
||||
"mod_alias",
|
||||
"mod_redirect",
|
||||
)
|
||||
|
||||
server.document-root = "/var/www/html"
|
||||
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
||||
server.errorlog = "/var/log/lighttpd/error.log"
|
||||
server.pid-file = "/run/lighttpd.pid"
|
||||
server.username = "www-data"
|
||||
server.groupname = "www-data"
|
||||
server.port = 80
|
||||
|
||||
# features
|
||||
#https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_feature-flagsDetails
|
||||
server.feature-flags += ("server.h2proto" => "enable")
|
||||
server.feature-flags += ("server.h2c" => "enable")
|
||||
server.feature-flags += ("server.graceful-shutdown-timeout" => 5)
|
||||
#server.feature-flags += ("server.graceful-restart-bg" => "enable")
|
||||
|
||||
# strict parsing and normalization of URL for consistency and security
|
||||
# https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails
|
||||
# (might need to explicitly set "url-path-2f-decode" = "disable"
|
||||
# if a specific application is encoding URLs inside url-path)
|
||||
server.http-parseopts = (
|
||||
"header-strict" => "enable",# default
|
||||
"host-strict" => "enable",# default
|
||||
"host-normalize" => "enable",# default
|
||||
"url-normalize-unreserved"=> "enable",# recommended highly
|
||||
"url-normalize-required" => "enable",# recommended
|
||||
"url-ctrls-reject" => "enable",# recommended
|
||||
"url-path-2f-decode" => "enable",# recommended highly (unless breaks app)
|
||||
#"url-path-2f-reject" => "enable",
|
||||
"url-path-dotseg-remove" => "enable",# recommended highly (unless breaks app)
|
||||
#"url-path-dotseg-reject" => "enable",
|
||||
#"url-query-20-plus" => "enable",# consistency in query string
|
||||
)
|
||||
|
||||
index-file.names = ( "index.php", "index.html" )
|
||||
url.access-deny = ( "~", ".inc" )
|
||||
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
|
||||
|
||||
# default listening port for IPv6 falls back to the IPv4 port
|
||||
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
|
||||
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
|
||||
include "/etc/lighttpd/conf-enabled/*.conf"
|
||||
|
||||
#server.compat-module-load = "disable"
|
||||
server.modules += (
|
||||
"mod_dirlisting",
|
||||
"mod_staticfile",
|
||||
)
|
||||
|
||||
cgi.assign = (
|
||||
"/service-menu.sh" => "/bin/bash"
|
||||
)
|
||||
2
service-menu.sh
Normal file
2
service-menu.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
bscpylgtvcommand 192.168.0.3 button IN_START
|
||||
Loading…
Add table
Add a link
Reference in a new issue