Expose 8000
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Simon Bruder 2020-02-01 12:52:49 +00:00
parent 9202a01802
commit ab156a68ea
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,12 @@
FROM node:alpine as node-modules
WORKDIR /usr/src/app
COPY package.json .
COPY package-lock.json .
RUN npm install
FROM debian:testing-slim FROM debian:testing-slim
RUN apt-get update \ RUN apt-get update \
@ -5,7 +14,6 @@ RUN apt-get update \
fonts-roboto \ fonts-roboto \
inkscape \ inkscape \
nodejs \ nodejs \
npm \
openscad \ openscad \
pstoedit \ pstoedit \
python3 \ python3 \
@ -14,14 +22,15 @@ RUN apt-get update \
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY package.json . COPY --from=node-modules /usr/src/app/node_modules node_modules
COPY package-lock.json .
COPY requirements.txt . COPY requirements.txt .
RUN npm install \ RUN pip3 install --no-cache-dir -r requirements.txt
&& pip3 install -r requirements.txt
RUN mkdir static RUN mkdir static
COPY . . COPY . .
ENTRYPOINT ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "server:app"] ENTRYPOINT ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "server:app"]
EXPOSE 8000

View file

@ -1,3 +1,2 @@
flask flask
gunicorn gunicorn
lxml

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from flask import Flask, request, render_template, url_for, redirect from flask import Flask, request, render_template, url_for, redirect
from lxml import etree
from subprocess import run from subprocess import run
app = Flask(__name__) app = Flask(__name__)