This commit is contained in:
34
.gitea/workflows/build-docker-image.yaml
Normal file
34
.gitea/workflows/build-docker-image.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
name: build docker image
|
||||
|
||||
on:
|
||||
- push
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.stuzer.link
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: gitea.stuzer.link/stuzer05/docker-script-server:latest
|
||||
cache-from: type=registry,ref=gitea.stuzer.link/stuzer05/docker-script-server:latest
|
||||
cache-to: type=inline
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.idea
|
||||
app/runners/*
|
||||
!app/runners/.gitkeep
|
||||
app/scripts/*
|
||||
!app/scripts/.gitkeep
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ENV TZ=Europe/Kyiv
|
||||
ARG VERSION=1.18.0
|
||||
|
||||
RUN apk add --update --no-cache \
|
||||
tzdata \
|
||||
python3 \
|
||||
py3-pip \
|
||||
curl \
|
||||
bash \
|
||||
&& rm -rf /var/cache/apk/* && mkdir -p /app mkdir -p /app/conf \
|
||||
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
|
||||
&& wget https://github.com/bugy/script-server/releases/download/$VERSION/script-server.zip -O /tmp/script-server.zip
|
||||
COPY app/conf.json /app/conf/conf.json
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN unzip /tmp/script-server.zip -d /app && rm -rfv /tmp/script-server.zip && \
|
||||
pip install --break-system-packages -r requirements.txt
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD [ "python3", "launcher.py" ]
|
7
app/admin-conf.json
Normal file
7
app/admin-conf.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"title": "Script server",
|
||||
"port": "5000",
|
||||
"access": {
|
||||
"admin_users": [ "*" ]
|
||||
}
|
||||
}
|
4
app/conf.json
Normal file
4
app/conf.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Script server",
|
||||
"port": "5000"
|
||||
}
|
0
app/runners/.gitkeep
Normal file
0
app/runners/.gitkeep
Normal file
0
app/scripts/.gitkeep
Normal file
0
app/scripts/.gitkeep
Normal file
BIN
app/themes/dark/darkBackground_header.jpg
Normal file
BIN
app/themes/dark/darkBackground_header.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
app/themes/dark/darkBackground_login.jpg
Normal file
BIN
app/themes/dark/darkBackground_login.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
42
app/themes/dark/theme.css
Normal file
42
app/themes/dark/theme.css
Normal file
@ -0,0 +1,42 @@
|
||||
html:root {
|
||||
--hover-color: rgba(255, 255, 255, 0.04);
|
||||
--focus-color: rgba(255, 255, 255, 0.12);
|
||||
--focus-color-solid: #424242;
|
||||
|
||||
--font-color-main: rgba(255, 255, 255, 0.87);
|
||||
--font-color-medium: rgba(255, 255, 255, 0.60);
|
||||
--font-color-disabled: rgba(255, 255, 255, 0.38);
|
||||
|
||||
--primary-color: #dce775;
|
||||
--primary-color-raised-hover-solid: #E6F17F;
|
||||
--primary-color-raised-focus-solid: #FAFF93;
|
||||
--primary-color-when-focused: rgba(0, 0, 0, 0.12);
|
||||
--primary-color-when-hovered: rgba(0, 0, 0, 0.04);
|
||||
--font-on-primary-color-main: rgba(0, 0, 0, 0.87);
|
||||
--font-on-primary-color-medium: rgba(0, 0, 0, 0.60);
|
||||
|
||||
--primary-color-dark-color: #a8b545;
|
||||
--primary-color-dark-when-focused: rgba(0, 0, 0, 0.12);
|
||||
--primary-color-dark-when-hovered: rgba(0, 0, 0, 0.04);
|
||||
--font-on-primary-color-dark-main: rgba(0, 0, 0, 0.87);
|
||||
--font-on-primary-color-dark-medium: rgba(0, 0, 0, 0.60);
|
||||
|
||||
--primary-color-light-color: #F0F4C3;
|
||||
|
||||
--surface-color: #121212;
|
||||
|
||||
--background-color: #242424;
|
||||
--background-color-slight-emphasis: rgba(255, 255, 255, 0.05);
|
||||
--background-color-high-emphasis: rgba(255, 255, 255, 0.09);
|
||||
--background-color-level-4dp: rgba(255, 255, 255, 0.09);
|
||||
--background-color-level-8dp: rgba(255, 255, 255, 0.12);
|
||||
--background-color-level-16dp: rgba(255, 255, 255, 0.15);
|
||||
--background-color-disabled: rgba(255, 255, 255, 0.12);
|
||||
|
||||
--script-header-background: url('../theme/darkBackground_header.jpg') center / cover no-repeat;
|
||||
--login-header-background: url('../theme/darkBackground_login.jpg') center / cover no-repeat;
|
||||
|
||||
--separator-color: #424242;
|
||||
|
||||
--outline-color: rgba(255, 255, 255, 0.18);
|
||||
}
|
14
app/themes/orange/theme.css
Normal file
14
app/themes/orange/theme.css
Normal file
@ -0,0 +1,14 @@
|
||||
html:root {
|
||||
|
||||
--primary-color: #E64A19;
|
||||
--primary-color-raised-hover-solid: #F05423;
|
||||
--primary-color-raised-focus-solid: #FF7241;
|
||||
|
||||
--primary-color-dark-color: #BF360C;
|
||||
|
||||
--primary-color-light-color: #FBE9E7;
|
||||
|
||||
--script-header-background: #FFCC80;
|
||||
--login-header-background: var(--primary-color-dark-color);
|
||||
|
||||
}
|
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
||||
services:
|
||||
script-server:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=Europe/Kyiv
|
||||
ports:
|
||||
- 5000:5000
|
||||
volumes:
|
||||
- ./app/conf.json:/app/conf/conf.json
|
||||
- ./app/runners/:/app/conf/runners
|
||||
- ./app/scripts:/app/conf/scripts
|
||||
image: gitea.stuzer.link/stuzer05/docker-script-server:latest
|
||||
container_name: script-server
|
Reference in New Issue
Block a user