Move Python app into its own directory

This commit is contained in:
Christoph Reiter
2020-05-24 09:07:47 +02:00
parent e15d68217d
commit bf01b34838
27 changed files with 6 additions and 6 deletions

View File

@@ -6,11 +6,11 @@ RUN apt-get update && apt-get install -y \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install "poetry==1.0.5"
COPY . /app
WORKDIR /app
RUN python3 -m pip install "poetry==1.0.5"
RUN poetry install --no-dev
ENTRYPOINT ["poetry","run", "gunicorn", "-w1", "-b0.0.0.0:80", "main:app"]
ENTRYPOINT ["poetry","run", "gunicorn", "-w1", "-b0.0.0.0:80", "app.main:app"]
EXPOSE 80

View File

@@ -18,7 +18,7 @@ Run for Development::
poetry shell
poetry install
python main.py --cache --debug
python app/main.py --cache --debug
Run for Production::

0
app/__init__.py Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -9,7 +9,7 @@ const dev = process.env.ROLLUP_WATCH === 'true';
export default {
input: 'index.js',
output: {
file: 'static/index.js',
file: 'app/static/index.js',
format: 'iife'
},
plugins: [

View File

@@ -5,7 +5,7 @@ import os
os.environ["NO_UPDATE_THREAD"] = "1"
import pytest
from main import app, parse_cygwin_versions
from app.main import app, parse_cygwin_versions
@pytest.fixture