This commit is contained in:
parent
9202a01802
commit
ab156a68ea
19
Dockerfile
19
Dockerfile
|
@ -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
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
flask
|
flask
|
||||||
gunicorn
|
gunicorn
|
||||||
lxml
|
|
||||||
|
|
|
@ -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__)
|
||||||
|
|
||||||
|
|
Reference in a new issue