Move Python app into its own directory
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
0
app/__init__.py
Normal file
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
@@ -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: [
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user