Initial commit

master
Dessa Simpson 2022-10-13 07:16:08 +00:00
commit e40b26bc05
7 changed files with 33 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "0x0"]
path = 0x0
url = https://git.0x0.st/mia/0x0

1
0x0 Submodule

@ -0,0 +1 @@
Subproject commit afb581187981b56d29e7b11c15c5fce08c0899a6

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM alpine
VOLUME /app/instance
WORKDIR /app
RUN ln -s /app/cleanup.py /etc/periodic/daily/
RUN apk add s6 python3 libmagic py3-alembic py3-jinja2 py3-flask py3-pip py3-wheel py3-numpy py3-sqlalchemy py3-requests py3-greenlet uwsgi uwsgi-python3
RUN mv /etc/crontabs/root /etc/crontabs/uwsgi
COPY --chown=uwsgi 0x0 /app
RUN pip install -r requirements.txt
COPY services /services
CMD ["/bin/s6-svscan","/services"]

2
instance/config.py Normal file
View File

@ -0,0 +1,2 @@
SQLALCHEMY_DATABASE_URI="sqlite:///app/instance/db.sqlite"
FHOST_STORAGE_PATH="/app/instance/upload"

3
instance/upload/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!*/
!.gitignore

2
services/cron/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/sbin/crond -f -l 2

9
services/uwsgi/run Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
cd /app
exec /usr/sbin/uwsgi --uid uwsgi \
--plugins python3 \
--http-socket :8080 \
--wsgi-file fhost.py \
--callable app \
--processes 2 \
--threads 4