added docker image
This commit is contained in:
10
build_docker_image.sh
Executable file
10
build_docker_image.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
venv/bin/python -m build
|
||||||
|
mkdir -p docker/build
|
||||||
|
cp dist/sspoc-*.whl docker/build/
|
||||||
|
cp docker/Dockerfile docker/build/Dockerfile
|
||||||
|
cp docker/uwsgi.ini docker/build/uwsgi.ini
|
||||||
|
|
||||||
|
docker build docker/build --tag sspoc:latest
|
18
docker/Dockerfile
Normal file
18
docker/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
MAINTAINER Oggioni Walter <oggioni.walter@gmail.com>
|
||||||
|
RUN apk update
|
||||||
|
RUN apk add python3 py3-pip uwsgi uwsgi-python3 graphviz uwsgi-gevent3
|
||||||
|
RUN mkdir /srv/http
|
||||||
|
RUN mkdir /var/sspoc
|
||||||
|
WORKDIR /var/sspoc
|
||||||
|
RUN python -m venv venv
|
||||||
|
ADD uwsgi.ini /var/sspoc
|
||||||
|
ADD sspoc-*.whl /
|
||||||
|
RUN venv/bin/pip install /sspoc-*.whl && rm /sspoc-*.whl
|
||||||
|
VOLUME /srv/http
|
||||||
|
WORKDIR /srv/http
|
||||||
|
ENTRYPOINT ["uwsgi"]
|
||||||
|
EXPOSE 1910/tcp
|
||||||
|
EXPOSE 1910/udp
|
||||||
|
USER nobody
|
||||||
|
CMD [ "--ini", "/var/sspoc/uwsgi.ini" ]
|
8
docker/uwsgi.ini
Normal file
8
docker/uwsgi.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[uwsgi]
|
||||||
|
#logformat = "%(proto) - %(method) %(uri) %(status) %(addr)
|
||||||
|
need-plugin=/usr/lib/uwsgi/python_plugin.so
|
||||||
|
need-plugin=/usr/lib/uwsgi/gevent3_plugin.so
|
||||||
|
socket = :1910
|
||||||
|
module = sspoc.server:app
|
||||||
|
virtualenv = /var/sspoc/venv
|
||||||
|
gevent = 1000
|
@@ -17,6 +17,8 @@ classifiers = [
|
|||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"gevent",
|
||||||
|
"greenlet",
|
||||||
"flask >= 3.0",
|
"flask >= 3.0",
|
||||||
'cryptography>=42.0.0',
|
'cryptography>=42.0.0',
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user