diff --git a/Dockerfile b/Dockerfile index f1a52568c..ad18c37d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN npm install COPY ./frontend/ . RUN npm run build -FROM python:3.8-alpine +FROM python:3.9-alpine RUN apk add --no-cache libxml2-dev libxslt-dev libxml2 ENV ENV prod diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index ef59d0b42..91cd53766 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -56,7 +56,6 @@ This is, what I think, is a big release! Tons of new features and some great qua !!! error "Breaking Changes" - API endpoints have been refactored to adhear to a more consistent standard. This is a WIP and more changes are likely to occur. - Officially Dropped MongoDB Support - - Mounting volume moved to different internal location due to development issues. New volume should be mounted as `mealie/data:/app_data/`. Volume mounts need to be changed. - Database Breaks! We have not yet implemented a database migration service. As such, upgrades cannot be done by simply pulling the image. You must first export your recipes, update your deployment, and then import your recipes. This pattern is likely to be how upgrades take place prior to v1.0. After v1.0 migrations will be done automatically. ## v0.1.0 - Initial Beta diff --git a/docs/docs/getting-started/install.md b/docs/docs/getting-started/install.md index bc18e8954..14725e659 100644 --- a/docs/docs/getting-started/install.md +++ b/docs/docs/getting-started/install.md @@ -14,7 +14,7 @@ Deployment with the Docker CLI can be done with `docker run` and specify the dat docker run \ -e db_type='sqlite' \ -p 9000:80 \ - -v `pwd`:'/app_data/' \ + -v `pwd`:'/app/data/' \ hkotel/mealie:latest ``` @@ -35,7 +35,7 @@ services: db_type: sqlite TZ: America/Anchorage volumes: - - ./mealie/data/:/app_data + - ./mealie/data/:/app/data ``` diff --git a/frontend/src/api.js b/frontend/src/api.js index b0d714754..eafe13005 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -6,6 +6,7 @@ import themes from "./api/themes"; import migration from "./api/migration"; import myUtils from "./api/upload"; import category from "./api/category"; +import meta from "./api/meta"; // import api from "../api"; @@ -18,4 +19,5 @@ export default { migrations: migration, utils: myUtils, categories: category, + meta: meta, }; diff --git a/frontend/src/api/meta.js b/frontend/src/api/meta.js new file mode 100644 index 000000000..d8205c5f5 --- /dev/null +++ b/frontend/src/api/meta.js @@ -0,0 +1,15 @@ +import { baseURL } from "./api-utils"; +import { apiReq } from "./api-utils"; + +const prefix = baseURL + "debug"; + +const debugURLs = { + version: `${prefix}/version`, +}; + +export default { + async get_version() { + let response = await apiReq.get(debugURLs.version); + return response.data; + }, +}; diff --git a/frontend/src/pages/SettingsPage.vue b/frontend/src/pages/SettingsPage.vue index bc1d2a924..9b3f8b732 100644 --- a/frontend/src/pages/SettingsPage.vue +++ b/frontend/src/pages/SettingsPage.vue @@ -44,6 +44,7 @@ import General from "../components/Settings/General"; import Webhooks from "../components/Settings/Webhook"; import Theme from "../components/Settings/Theme"; import Migration from "../components/Settings/Migration"; +import api from "../api"; import axios from "axios"; export default { @@ -57,11 +58,13 @@ export default { data() { return { latestVersion: null, - version: "v0.1.0", + version: null, }; }, - mounted() { + async mounted() { this.getVersion(); + let versionData = await api.meta.get_version(); + this.version = versionData.version; }, computed: { newVersion() { diff --git a/mealie/app.py b/mealie/app.py index e50333784..615fb3ba1 100644 --- a/mealie/app.py +++ b/mealie/app.py @@ -3,7 +3,7 @@ from fastapi import FastAPI from fastapi.staticfiles import StaticFiles # import utils.startup as startup -from app_config import CWD, DATA_DIR, PORT, PRODUCTION, WEB_PATH, docs_url, redoc_url +from app_config import APP_VERSION, PORT, PRODUCTION, WEB_PATH, docs_url, redoc_url from routes import ( backup_routes, debug_routes, @@ -37,7 +37,7 @@ TODO: app = FastAPI( title="Mealie", description="A place for all your recipes", - version="0.0.1", + version=APP_VERSION, docs_url=docs_url, redoc_url=redoc_url, ) diff --git a/mealie/routes/backup_routes.py b/mealie/routes/backup_routes.py index 076a334d7..229d4c60a 100644 --- a/mealie/routes/backup_routes.py +++ b/mealie/routes/backup_routes.py @@ -98,7 +98,7 @@ def import_database( return imported -@router.delete("/{file_name}/delete", tags=["Import / Export"], status_code=200) +@router.delete("/{file_name}/delete", status_code=200) def delete_backup(file_name: str): """ Removes a database backup from the file system """ diff --git a/mealie/routes/debug_routes.py b/mealie/routes/debug_routes.py index 562ad68d3..0ba1d7883 100644 --- a/mealie/routes/debug_routes.py +++ b/mealie/routes/debug_routes.py @@ -1,7 +1,6 @@ import json -import os -from app_config import DEBUG_DIR +from app_config import APP_VERSION, DEBUG_DIR from fastapi import APIRouter from fastapi.responses import HTMLResponse from utils.logger import LOGGER_FILE @@ -9,6 +8,12 @@ from utils.logger import LOGGER_FILE router = APIRouter(prefix="/api/debug", tags=["Debug"]) +@router.get("/version") +async def get_mealie_version(): + """ Returns the current version of mealie""" + return {"version": APP_VERSION} + + @router.get("/last-recipe-json") async def get_last_recipe_json(): """ Doc Str """