Commit e5569951 authored by Jakob Moser's avatar Jakob Moser
Browse files

Merge branch 'add-flask-backend' into 'master'

Add a Flask-based backend

See merge request !4
parents c2bc782d af6ff28a
Loading
Loading
Loading
Loading
Loading
+30 −2
Changes for .dockerignore: 30 added lines, 2 removed lines.
Original line number Diff line number Diff line
# Python-related
venv
**/__pycache__
.ipynb_checkpoints

# JavaScript-related
package.json
package-lock.json
node_modules

# Tests
.coverage
.pytest_cache
htmlcov
testresults.xml
cypress/videos

# PyCharm configuration
.idea

# VS Code configuration
*.code-workspace

# Local instance data and configuration
instance

# Environment files (might contain secrets)
.env

# Git and Docker
.git
.gitlab-ci.yml
.dockerignore
.gitignore
Dockerfile
.prettierignore
.prettierrc.json

.gitignore

0 → 100644
+26 −0
Changes for .gitignore: 26 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Python-related
venv
__pycache__
.ipynb_checkpoints

# JavaScript-related
node_modules

# Tests
.coverage
.pytest_cache
htmlcov
testresults.xml
cypress/videos

# PyCharm configuration
.idea

# VS Code configuration
*.code-workspace

# Local instance data and configuration
instance

# Environment files (might contain secrets)
.env
+23 −3
Changes for Dockerfile: 23 added lines, 3 removed lines.
Original line number Diff line number Diff line
FROM nginx:latest
FROM python:3.12 AS base

RUN sed -i -E "s#(application/javascript\s+js);#\1 mjs;#" /etc/nginx/mime.types
# We will use /app as our main directory within the Docker container
WORKDIR /app
EXPOSE 5000

COPY . /usr/share/nginx/html
# First, copy and install only the requirements...
RUN pip install --upgrade pip setuptools
COPY requirements.txt .
RUN pip install -r requirements.txt

# ... then the rest of the application. This allows the installation stage to be cached most of the time
# (so we don't have reinstall of all dependencies every time the container is rebuilt)
COPY . .

FROM base AS dev
ENV SERVER_TYPE=flask
ENV FLASK_DEBUG=true
ENV FLASK_APP=portal
CMD ["bash", "./entrypoint.sh"]

FROM base AS prod
ENV SERVER_TYPE=uwsgi
RUN pip install uwsgi
CMD ["bash", "./entrypoint.sh"]

LICENSE

0 → 100644
+21 −0
Changes for LICENSE: 21 added lines, 0 removed lines.
Original line number Diff line number Diff line
MIT License

Copyright (c) 2024 Jakob Moser

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+12 −3
Changes for LICENSE-3RD-PARTY.md: 12 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,15 +2,24 @@

## Nautilus

-   Files: `lib/nautilus/*`
-   Files: `portal/static/lib/nautilus/*`
    -   Generated with JetBrains Code2Art
    -   Link: https://code2art.jetbrains.com/#1aa8e305
    -   Tool source code: https://github.com/JetBrains/open-radiant

## Font Awesome

-   Files: `img/portal.svg`
-   Files: `portal/static/lib/fontawesome-*`
    -   Author: Fonticons, Inc.
    -   Licenses: CC BY 4.0 (Icons), SIL OFL 1.1 (Fonts), MIT License (Code), see https://fontawesome.com/license/free
-   File: `portal/static/img/portal.svg`
    -   Based on the Font Awesome Icon `layer-group-solid` by Font Awesome, with modifications: Colors added
    -   Link: https://fontawesome.com/icons/layer-group?f=classic&s=solid
    -   License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
    -   See also https://fontawesome.com/license/free

## Mithril.js

-   Files: `portal/static/lib/mithril/*`
    -   Author: Leo Horie
    -   URL: https://github.com/MithrilJS/mithril.js
    -   License: [MIT License](portal/static/lib/mithril/LICENSE)
Loading