flask server
This commit is contained in:
parent
5acb2992ce
commit
0a71a6c840
54 changed files with 5876 additions and 0 deletions
32
server/flask/Dockerfile
Normal file
32
server/flask/Dockerfile
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
FROM python:3.9-bullseye
|
||||
|
||||
# ENV setup
|
||||
RUN ["python","--version"]
|
||||
RUN ["apt-get", "update"]
|
||||
RUN ["apt-get", "install", "nginx", "-y"]
|
||||
RUN ["pip", "install", "uwsgi"]
|
||||
RUN ["uwsgi", "--version"]
|
||||
RUN ["pip", "install", "flask"]
|
||||
RUN ["pip", "install", "passlib"]
|
||||
RUN ["pip", "install", "pyotp"]
|
||||
|
||||
# NGINX configuration setup
|
||||
COPY ./application/nginx-proxy-config /etc/nginx/sites-available/nginx-proxy-config
|
||||
RUN ln -s /etc/nginx/sites-available/nginx-proxy-config /etc/nginx/sites-enabled
|
||||
|
||||
COPY ./certificate /certificate
|
||||
|
||||
WORKDIR $HOME/server
|
||||
|
||||
# load source files
|
||||
COPY ./application $HOME/server
|
||||
|
||||
# run server commands
|
||||
RUN nginx -t
|
||||
RUN service nginx configtest
|
||||
|
||||
# create database - no longer needed, since binding volume
|
||||
#RUN mkdir instance
|
||||
#RUN python db.py
|
||||
|
||||
CMD service nginx restart & uwsgi --ini home-vod-server.ini
|
||||
Loading…
Add table
Add a link
Reference in a new issue