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

View file

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

View file

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