diff --git a/Dockerfile b/Dockerfile index 1ca414a..a9f7607 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.rst b/README.rst index cb66660..0c67284 100644 --- a/README.rst +++ b/README.rst @@ -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:: diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/app/main.py similarity index 100% rename from main.py rename to app/main.py diff --git a/static/images/Makefile b/app/static/images/Makefile similarity index 100% rename from static/images/Makefile rename to app/static/images/Makefile diff --git a/static/images/favicon.ico b/app/static/images/favicon.ico similarity index 100% rename from static/images/favicon.ico rename to app/static/images/favicon.ico diff --git a/static/images/logo.png b/app/static/images/logo.png similarity index 100% rename from static/images/logo.png rename to app/static/images/logo.png diff --git a/static/images/logo.svg b/app/static/images/logo.svg similarity index 100% rename from static/images/logo.svg rename to app/static/images/logo.svg diff --git a/static/index.css b/app/static/index.css similarity index 100% rename from static/index.css rename to app/static/index.css diff --git a/static/index.js b/app/static/index.js similarity index 100% rename from static/index.js rename to app/static/index.js diff --git a/templates/base.html b/app/templates/base.html similarity index 100% rename from templates/base.html rename to app/templates/base.html diff --git a/templates/baseindex.html b/app/templates/baseindex.html similarity index 100% rename from templates/baseindex.html rename to app/templates/baseindex.html diff --git a/templates/group.html b/app/templates/group.html similarity index 100% rename from templates/group.html rename to app/templates/group.html diff --git a/templates/groups.html b/app/templates/groups.html similarity index 100% rename from templates/groups.html rename to app/templates/groups.html diff --git a/templates/layout.html b/app/templates/layout.html similarity index 100% rename from templates/layout.html rename to app/templates/layout.html diff --git a/templates/navbar.html b/app/templates/navbar.html similarity index 100% rename from templates/navbar.html rename to app/templates/navbar.html diff --git a/templates/new.html b/app/templates/new.html similarity index 100% rename from templates/new.html rename to app/templates/new.html diff --git a/templates/outofdate.html b/app/templates/outofdate.html similarity index 100% rename from templates/outofdate.html rename to app/templates/outofdate.html diff --git a/templates/package.html b/app/templates/package.html similarity index 100% rename from templates/package.html rename to app/templates/package.html diff --git a/templates/python2.html b/app/templates/python2.html similarity index 100% rename from templates/python2.html rename to app/templates/python2.html diff --git a/templates/queue.html b/app/templates/queue.html similarity index 100% rename from templates/queue.html rename to app/templates/queue.html diff --git a/templates/removals.html b/app/templates/removals.html similarity index 100% rename from templates/removals.html rename to app/templates/removals.html diff --git a/templates/repos.html b/app/templates/repos.html similarity index 100% rename from templates/repos.html rename to app/templates/repos.html diff --git a/templates/search.html b/app/templates/search.html similarity index 100% rename from templates/search.html rename to app/templates/search.html diff --git a/templates/updates.html b/app/templates/updates.html similarity index 100% rename from templates/updates.html rename to app/templates/updates.html diff --git a/rollup.config.js b/rollup.config.js index 5e1e74b..263647b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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: [ diff --git a/test_main.py b/tests/test_main.py similarity index 96% rename from test_main.py rename to tests/test_main.py index bb9b2df..ef57e3e 100644 --- a/test_main.py +++ b/tests/test_main.py @@ -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