Compare commits

..

75 Commits

Author SHA1 Message Date
Hayden
8fe0cdc8a4 fix list test 2021-02-06 14:04:01 -09:00
Hayden
8b07f4e9e0 cleanup 2021-02-06 13:56:36 -09:00
Hayden
445fed853f Merge branch 'master' of https://github.com/hay-kot/mealie into feature/recipe-categories 2021-02-06 13:55:01 -09:00
Hayden
3cc3825bbe docs/new gifs & general updates 2021-02-06 13:42:44 -09:00
Hayden
23026a4cc4 debug routes 2021-02-06 13:07:21 -09:00
Hayden
b558a50a7d cleanup todos 2021-02-06 12:17:19 -09:00
Hayden
8866256a21 added category scroll 2021-02-06 12:17:10 -09:00
Hayden
7bcbe0464a refactor/create global css 2021-02-06 12:16:51 -09:00
Hayden
f471e38d88 fixed navigate on enter in search 2021-02-06 11:06:40 -09:00
hayden
561f586dd1 fixed backwards sort 2021-02-03 20:07:41 -09:00
hayden
38e4afcc3c api refactoring + random cleanup 2021-02-03 19:07:19 -09:00
hayden
c44edf97ae changelog 2021-02-03 19:07:01 -09:00
hayden
d0cc0a089a route refactoring 2021-02-03 19:06:51 -09:00
hayden
7188e58f4c general cleanup 2021-02-02 20:44:44 -09:00
hayden
40b78e427d drag and drop ingredients 2021-02-02 20:44:27 -09:00
hayden
c8e239bd81 refactor/ remove old code 2021-02-02 20:43:36 -09:00
hayden
cc35a4be19 refactor/ router endpoint 2021-02-02 20:42:58 -09:00
hayden
b6111afe69 fix categories database errors 2021-01-31 19:10:21 -09:00
hayden
88baa46a33 remove console.log + refactor categories 2021-01-31 19:10:09 -09:00
hayden
732a2cbc51 bug/normalize recipe steps html 2021-01-30 21:28:27 -09:00
hayden
34a10f375f update branch todos 2021-01-30 21:00:28 -09:00
hayden
f000dffde2 frontend category management 2021-01-30 20:58:16 -09:00
hayden
abcf40899f Merge branch 'dev' of https://github.com/hay-kot/mealie into feature/recipe-categories 2021-01-30 17:30:29 -09:00
hayden
d6794cba7d category/tag database relationship and endpoints 2021-01-30 17:25:05 -09:00
hayden
016108d35f refactor/recipe routers 2021-01-30 17:24:19 -09:00
wengtad
9b41990ea9 Fix missing translations key (#133)
* translation: add simplified & traditional chinese

* Fix missing translations

* fix chinese translations
2021-01-30 11:32:40 -08:00
hayden
3cadc3d04b merge kentors changes 2021-01-29 18:43:07 -09:00
Hayden
874bea7fa4 v0.2.0 Updates (#130)
* migration redesign init

* new color picker

* changelog

* added UI language selection

* fix layout issue on recipe editor

* remove git as dependency

* added UI editor for original URL

* CI/CD Tests

* test: fixed migration routes

* test todos

* bug/added docker volume

* chowdow test data

* partial image recipe image testing

* added card section card

* settings form

* homepage cetegory ui

* frontend category placeholder

* fixed broken scheduler

* remove old files

* removed temp test

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-29 19:31:24 -08:00
dekvall
ce48ae61c7 scraper: unescape html in instructions (#129)
Some urls erroneously deliver escaped html their instructions,
sometimes they are even escaped on multiple levels like here:

https://www.ica.se/recept/kladdig-kladdkaka-722982/

```
>>> normalize_instruction("S&amp;auml;tt ugnen p&amp;aring; 200&amp;deg;C.")
'Sätt ugnen på 200°C.'
```
2021-01-29 16:01:37 -08:00
dekvall
c746f7f4f8 translation: add swedish (#128)
* language: da is Danish

* translations: add swedish
2021-01-29 15:49:02 -08:00
Nick CJ
7f67f844bc Fix link to dev-notes.md (#110) 2021-01-24 12:15:12 -09:00
Hayden
079ebd8ee1 Migration redesign (#119)
* migration redesign init

* new color picker

* changelog

* added UI language selection

* fix layout issue on recipe editor

* remove git as dependency

* added UI editor for original URL

* CI/CD Tests

* test: fixed migration routes

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-23 19:53:39 -09:00
hayden
138093d062 fixed poetry install on docker.dev build 2021-01-22 22:53:17 -09:00
Hayden
99cf606a45 fixed menu links 2021-01-22 15:33:47 -09:00
Hayden
41e079d423 Upload component (#113)
* unified upload button + download backups

* javascript toolings

* fix vuetur config

* fixed type check error

* refactor: clean up bag javascript

* UI updates + name validation

* docs: changelog + sp

* fixed route links

* changelog

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-22 09:23:25 -09:00
Hayden
f35e9c20d6 Upload component (#108)
* unified upload button + download backups

* javascript toolings

* fix vuetur config

* fixed type check error

* refactor: clean up bag javascript

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-20 20:56:47 -09:00
Hayden
51893e89cd Meal planner improvements (#107)
* dev-bug: fixed vscode freezes

* test: refactor database init to support tests

* mealplan CRUD testing

* restructure test folder

* git attributes

* tests: migration, settings, theme routes testing

* docker-file shrink

* rebuild

* refactor: moving directories around

* adding funding

* mealplan redesign

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-20 17:01:43 -09:00
Hayden
76830802cc Refactor + New Docker File (#105)
* dev-bug: fixed vscode freezes

* test: refactor database init to support tests

* mealplan CRUD testing

* restructure test folder

* git attributes

* tests: migration, settings, theme routes testing

* docker-file shrink

* rebuild

* refactor: moving directories around

* adding funding

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-20 17:00:56 -09:00
Hayden
29db7f8a67 Settings, Themes and Migration Route Tests (#100)
* dev-bug: fixed vscode freezes

* test: refactor database init to support tests

* mealplan CRUD testing

* restructure test folder

* git attributes

* tests: migration, settings, theme routes testing

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-19 15:51:36 -09:00
sephrat
22a517b9c0 Fix typos (#96) 2021-01-19 10:06:48 -09:00
Hayden
2ffaecb7b7 Mealplan CRUD Tests (#95)
* dev-bug: fixed vscode freezes

* test: refactor database init to support tests

* mealplan CRUD testing

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-18 19:54:46 -09:00
Hayden
bfc28fc506 New tests (#94)
* dev-bug: fixed vscode freezes

* test: refactor database init to support tests

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-18 15:20:15 -09:00
Bastien
6ee4fc2ea6 Add French Translation (#93) 2021-01-18 13:09:42 -09:00
Hayden
567bff8b42 Dropping Mongo From Dev Branch (#89)
* Fix link to Docker Hub

Found an extra s. DESTROYED it.

* initial pass

* second pass cleanup

* backup card framework

* backup card functionality

* translation

* upload button vile creation

* Release v0.1.0 Candidate (#85)

* Changed uvicorn port to 80

* Changed port in docker-compose to match dockerfile

* Readded environment variables in docker-compose

* production image rework

* Use opengraph metadata to make basic recipe cards when full recipe metadata is not available

* fixed instrucitons on parse

* add last_recipe

* automated testing

* roadmap update

* Sqlite (#75)

* file structure

* auto-test

* take 2

* refactor ap scheduler and startup process

* fixed scraper error

* database abstraction

* database abstraction

* port recipes over to new schema

* meal migration

* start settings migration

* finale mongo port

* backup improvements

* migration imports to new DB structure

* unused import cleanup

* docs strings

* settings and theme import logic

* cleanup

* fixed tinydb error

* requirements

* fuzzy search

* remove scratch file

* sqlalchemy models

* improved search ui

* recipe models almost done

* sql modal population

* del scratch

* rewrite database model mixins

* mostly grabage

* recipe updates

* working sqllite

* remove old files and reorganize

* final cleanup

Co-authored-by: Hayden <hay-kot@pm.me>

* Backup card (#78)

* backup / import dialog

* upgrade to new tag method

* New import card

* rename settings.py to app_config.py

* migrate to poetry for development

* fix failing test

Co-authored-by: Hayden <hay-kot@pm.me>

* added mkdocs to docker-compose

* Translations (#72)

* Translations + danish

* changed back proxy target to use ENV

* Resolved more merge conflicts

* Removed test in translation

* Documentation of translations

* Updated translations

* removed old packages

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>

* fail to start bug fixes

* feature: prep/cook/total time slots (#80)

Co-authored-by: Hayden <hay-kot@pm.me>

* missing bind attributes

* Bug fixes (#81)

* fix: url remains after succesful import

* docs: changelog + update todos

* arm image

* arm compose

* compose updates

* update poetry

* arm support

Co-authored-by: Hayden <hay-kot@pm.me>

* dockerfile hotfix

* dockerfile hotfix

* Version Release Final Touches (#84)

* Remove slim

* bug: opacity issues

* bug: startup failure with no database

* ci/cd on dev branch

* formatting

* v0.1.0 documentation

Co-authored-by: Hayden <hay-kot@pm.me>

* db init hotfix

* bug: fix crash in mongo

* fix mongo bug

* fixed version notifier

* finale changelog

Co-authored-by: kentora <=>
Co-authored-by: Hayden <hay-kot@pm.me>
Co-authored-by: Richard Mitic <richard.h.mitic@gmail.com>
Co-authored-by: kentora <kentora@kentora.dk>

* build container

* webscraper hotfix

* dev bug: change data location to prevent reloads

* api docs

* api docs bug

* workflow update

Co-authored-by: David Young <davidy@funkypenguin.co.nz>
Co-authored-by: Hayden <hay-kot@pm.me>
Co-authored-by: Richard Mitic <richard.h.mitic@gmail.com>
Co-authored-by: kentora <kentora@kentora.dk>
2021-01-18 09:48:58 -09:00
Hayden
3a5f99919b finale changelog 2021-01-17 21:24:40 -09:00
Hayden
d0f9917c6f fixed version notifier 2021-01-17 21:22:39 -09:00
Hayden
d1fe1f44b8 fix mongo bug 2021-01-17 15:06:43 -09:00
Hayden
b00b0c8af4 bug: fix crash in mongo 2021-01-17 13:52:43 -09:00
Hayden
c6403a7998 db init hotfix 2021-01-17 12:10:13 -09:00
Hayden
a76f472aa4 Version Release Final Touches (#84)
* Remove slim

* bug: opacity issues

* bug: startup failure with no database

* ci/cd on dev branch

* formatting

* v0.1.0 documentation

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-17 10:53:42 -09:00
Hayden
6bc7c4ceb0 dockerfile hotfix 2021-01-16 16:50:37 -09:00
Hayden
cf45fa0015 dockerfile hotfix 2021-01-16 16:49:13 -09:00
Hayden
5b15ffdf5f Bug fixes (#81)
* fix: url remains after succesful import

* docs: changelog + update todos

* arm image

* arm compose

* compose updates

* update poetry

* arm support

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-16 15:48:19 -09:00
Hayden
53f15b17ea missing bind attributes 2021-01-16 12:11:19 -09:00
Hayden
cbcbc3a339 feature: prep/cook/total time slots (#80)
Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-16 12:06:02 -09:00
Hayden
9a616910f3 fail to start bug fixes 2021-01-16 12:05:37 -09:00
kentora
0167f2f1ca Translations (#72)
* Translations + danish

* changed back proxy target to use ENV

* Resolved more merge conflicts

* Removed test in translation

* Documentation of translations

* Updated translations

* removed old packages

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2021-01-16 12:00:35 -09:00
Hayden
b689c4715b added mkdocs to docker-compose 2021-01-16 09:33:37 -09:00
Hayden
d0f89956f4 Backup card (#78)
* backup / import dialog

* upgrade to new tag method

* New import card

* rename settings.py to app_config.py

* migrate to poetry for development

* fix failing test

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-16 09:32:55 -09:00
Hayden
25988836c0 Sqlite (#75)
* file structure

* auto-test

* take 2

* refactor ap scheduler and startup process

* fixed scraper error

* database abstraction

* database abstraction

* port recipes over to new schema

* meal migration

* start settings migration

* finale mongo port

* backup improvements

* migration imports to new DB structure

* unused import cleanup

* docs strings

* settings and theme import logic

* cleanup

* fixed tinydb error

* requirements

* fuzzy search

* remove scratch file

* sqlalchemy models

* improved search ui

* recipe models almost done

* sql modal population

* del scratch

* rewrite database model mixins

* mostly grabage

* recipe updates

* working sqllite

* remove old files and reorganize

* final cleanup

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-15 21:46:35 -09:00
Hayden
5f25b2492e roadmap update 2021-01-10 12:21:53 -09:00
Hayden
4562a8ca10 automated testing 2021-01-10 11:21:06 -09:00
Hayden
80468d0c47 add last_recipe 2021-01-10 11:08:19 -09:00
Hayden
9efd9399d9 fixed instrucitons on parse 2021-01-10 11:04:52 -09:00
Hayden
8d0604da3a Merge pull request #65 from richardmitic/opengraph
Use opengraph metadata to make basic recipe cards
2021-01-10 10:58:48 -09:00
Richard Mitic
9818d567b9 Use opengraph metadata to make basic recipe cards when full recipe metadata is not available 2021-01-10 20:15:43 +01:00
Hayden
a4a33af1c3 Merge pull request #64 from hay-kot/dockerfile-minification
Dockerfile minification
2021-01-09 23:20:55 -09:00
Hayden
965fa81d9b Merge branch 'dev' into dockerfile-minification 2021-01-09 23:20:40 -09:00
Hayden
0eb1e952b2 production image rework 2021-01-09 22:57:19 -09:00
Hayden
021a9025da Merge pull request #57 from kentora/issue-55
Changed uvicorn port to 80
2021-01-09 22:55:54 -09:00
kentora
fe69114b0b Merge branch 'dev' of https://github.com/hay-kot/mealie into issue-55 2021-01-10 08:34:25 +01:00
kentora
296e24b119 Readded environment variables in docker-compose 2021-01-10 08:30:06 +01:00
Hayden
4b0e9c0d76 Merge pull request #61 from hay-kot/master
Fix PR Error
2021-01-09 19:53:38 -09:00
kentora
9c1d0d9ec9 Changed port in docker-compose to match dockerfile 2021-01-09 22:25:01 +01:00
kentora
e7cb7c6cfd Changed uvicorn port to 80 2021-01-09 22:18:21 +01:00
23 changed files with 233 additions and 133 deletions

View File

@@ -1,6 +1,6 @@
{
"python.formatting.provider": "black",
"python.pythonPath": ".venv/bin/python3.9",
"python.pythonPath": ".venv/bin/python3.8",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.autoComplete.extraPaths": ["mealie", "mealie/mealie"],

27
.vscode/tasks.json vendored
View File

@@ -22,33 +22,6 @@
"reveal": "always"
},
"group": "test"
},
{
"label": "Dev: Start local Backend",
"command": "../${config:python.pythonPath}",
"args": ["app.py"],
"options": {
"cwd": "${workspaceFolder}/mealie/"
},
"type": "shell",
"problemMatcher": [],
"presentation": {
"reveal": "always",
"group": "groupA"
}
},
{
"label": "Dev: Start local Frontend",
"command": "npm run serve",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/frontend/"
},
"problemMatcher": [],
"presentation": {
"reveal": "always",
"group": "groupA"
}
}
]
}

View File

@@ -5,7 +5,7 @@ RUN npm install
COPY ./frontend/ .
RUN npm run build
FROM python:3.9-alpine
FROM python:3.8-alpine
RUN apk add --no-cache libxml2-dev libxslt-dev libxml2
ENV ENV prod
@@ -17,6 +17,7 @@ COPY ./pyproject.toml /app/
RUN apk add --update --no-cache --virtual .build-deps \
curl \
g++ \
py-lxml \
python3-dev \
musl-dev \
gcc \
@@ -34,5 +35,5 @@ COPY --from=build-stage /app/dist /app/dist
RUN rm -rf /app/test /app/.temp
VOLUME [ "/app/data/" ]
VOLUME [ "/app_data/" ]
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"]

33
Dockerfile.arm Normal file
View File

@@ -0,0 +1,33 @@
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY ./frontend/package*.json ./
RUN npm install
COPY ./frontend/ .
RUN npm run build
FROM mrnr91/uvicorn-gunicorn-fastapi:python3.8
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN apt-get update -y && \
apt-get install -y python-pip python-dev git curl --no-install-recommends
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
COPY ./pyproject.toml ./app/poetry.lock* /app/
COPY ./mealie /app
RUN poetry install --no-root --no-dev
COPY --from=build-stage /app/dist /app/dist
RUN rm -rf /app/test /app/.temp
ENV ENV prod
ENV APP_MODULE "app:app"
VOLUME [ "/app/data" ]

1
dev/scripts/buildx.sh Normal file
View File

@@ -0,0 +1 @@
docker buildx build .

0
dev/scripts/scrape_recipe.py Executable file → Normal file
View File

View File

@@ -0,0 +1,17 @@
$CWD = Get-Location
$pyFolder = Join-Path -Path $CWD -ChildPath "mealie"
$pyVenv = Join-Path -Path $CWD -ChildPath "/venv/Scripts/python.exe"
$pyScript = Join-Path -Path $CWD -ChildPath "/mealie/app.py"
$pythonCommand = "powershell.exe -NoExit -Command $pyVenv $pyScript"
$vuePath = Join-Path -Path $CWD -ChildPath "/frontend"
$npmCommand = "powershell.exe -NoExit -Command npm run serve"
wt -d $pyFolder "powershell.exe" $pythonCommand `; split-pane -d $vuePath "powershell.exe" $npmCommand
Start-Process chrome "http://127.0.0.1:8000/docs"
Start-Process chrome "http://127.0.0.1:8080
"

16
docker-compose.arm.yml Normal file
View File

@@ -0,0 +1,16 @@
# Use root/example as user/password credentials
# Frontend/Backend Served via the same Uvicorn Server
version: "3.1"
services:
mealie:
build:
context: ./
dockerfile: Dockerfile.arm
container_name: mealie
restart: always
ports:
- 9090:80
environment:
db_type: sql
volumes:
- ./mealie/data/:/app/data

View File

@@ -10,3 +10,6 @@ services:
- 9090:80
environment:
db_type: sqlite
# volumes:
# - ./mealie/data/:/app/data

View File

@@ -56,6 +56,7 @@ 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

View File

@@ -14,16 +14,7 @@ There are VSCode tasks created in the .vscode folder. You can use these to quick
## Without Docker
Prerequisites
- Python 3.8+
- Poetry
- Nodejs
- npm
change directories into the mealie directory and run poetry install. cd into the frontend directory and run npm install. After installing dependencies, you can use vscode tasks to run the front and backend server. Use the command pallette to access the tasks.
Alternatively you can run `npm run serve` in the frontend directory and `python app.py` in the mealie directory to get everything up and running for development.
?? TODO
## Trouble Shooting

View File

@@ -1,5 +1,5 @@
# Installation
To deploy docker on your local network it is highly recommended to use docker to deploy the image straight from dockerhub. Using the docker-compose below you should be able to get a stack up and running easily by changing a few default values and deploying. Currently only SQLite is supported. Postrgres support is planned, however for most loads you may find SQLite performant enough.
To deploy docker on your local network it is highly recommended to use docker to deploy the image straight from dockerhub. Using the docker-compose below you should be able to get a stack up and running easily by changing a few default values and deploying. Currently MongoDB and SQLite are supported. MongoDB support will be dropped in v0.2.0 so it is recommended to go with SQLite for new deployments. Postrgres support is planned, however for most loads you may find SQLite performant enough for most use cases.
[Get Docker](https://docs.docker.com/get-docker/)
@@ -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
```
@@ -46,7 +46,7 @@ services:
| db_type | sqlite | The database type to be used. Current Options 'sqlite' |
| mealie_port | 9000 | The port exposed by mealie. **do not change this if you're running in docker** If you'd like to use another port, map 9000 to another port of the host. |
| api_docs | True | Turns on/off access to the API documentation locally. |
| TZ | UTC | You should set your time zone accordingly so the date/time features work correctly |
| TZ | | You should set your time zone accordingly so the date/time features work correctly |
## Deployed as a Python Application

View File

@@ -1 +1 @@
VUE_APP_API_BASE_URL=http://localhost:9000
VUE_APP_API_BASE_URL=http://10.10.10.12:9921

View File

@@ -1966,16 +1966,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": {
"version": "13.0.1",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz",
@@ -2037,16 +2027,14 @@
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"ssri": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz",
"integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
"figgy-pudding": "^3.5.1",
"minipass": "^3.1.1"
}
},
"source-map": {
@@ -11605,6 +11593,87 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.1.2",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz",
"integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.4.9",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.9.tgz",

View File

@@ -6,7 +6,6 @@ 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";
@@ -19,5 +18,4 @@ export default {
migrations: migration,
utils: myUtils,
categories: category,
meta: meta,
};

View File

@@ -1,15 +0,0 @@
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;
},
};

View File

@@ -12,8 +12,28 @@
></v-file-input>
</v-col>
<v-col cols="3"></v-col>
<v-row>
<v-col>
<v-text-field
label="Total Time"
v-model="value.totalTime"
></v-text-field>
</v-col>
<v-col
><v-text-field
label="Prep Time"
v-model="value.prepTime"
></v-text-field
></v-col>
<v-col
><v-text-field
label="Cook Time / Perform Time"
v-model="value.performTime"
></v-text-field
></v-col>
</v-row>
<v-row dense>
</v-row>
<v-row>
<v-col>
<v-text-field
:label="$t('recipe.total-time')"
@@ -268,8 +288,8 @@ export default {
drag: false,
fileObject: null,
rules: {
required: v => !!v || this.$i18n.t("recipe.key-name-required"),
whiteSpace: v =>
required: (v) => !!v || this.$i18n.t("recipe.key-name-required"),
whiteSpace: (v) =>
!v ||
v.split(" ").length <= 1 ||
this.$i18n.t("recipe.no-white-space-allowed"),
@@ -286,7 +306,7 @@ export default {
methods: {
async getCategories() {
let response = await api.categories.get_all();
this.categories = response.map(cat => cat.name);
this.categories = response.map((cat) => cat.name);
},
uploadImage() {
this.$emit("upload", this.fileObject);
@@ -333,7 +353,7 @@ export default {
appendSteps(steps) {
let processSteps = [];
steps.forEach(element => {
steps.forEach((element) => {
processSteps.push({ text: element });
});

View File

@@ -44,7 +44,6 @@ 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 {
@@ -58,13 +57,11 @@ export default {
data() {
return {
latestVersion: null,
version: null,
version: "v0.1.0",
};
},
async mounted() {
mounted() {
this.getVersion();
let versionData = await api.meta.get_version();
this.version = versionData.version;
},
computed: {
newVersion() {

View File

@@ -3,7 +3,7 @@ from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
# import utils.startup as startup
from app_config import APP_VERSION, PORT, PRODUCTION, WEB_PATH, docs_url, redoc_url
from app_config import PORT, PRODUCTION, WEB_PATH, docs_url, redoc_url
from routes import (
backup_routes,
debug_routes,
@@ -20,6 +20,7 @@ from routes.recipe import (
recipe_crud_routes,
tag_routes,
)
from utils.api_docs import generate_api_docs
from utils.logger import logger
"""
@@ -37,7 +38,7 @@ TODO:
app = FastAPI(
title="Mealie",
description="A place for all your recipes",
version=APP_VERSION,
version="0.0.1",
docs_url=docs_url,
redoc_url=redoc_url,
)

View File

@@ -15,31 +15,14 @@ def ensure_dirs():
ENV = CWD.joinpath(".env")
dotenv.load_dotenv(ENV)
# General
APP_VERSION = "v0.2.0"
PRODUCTION = os.environ.get("ENV")
PORT = int(os.getenv("mealie_port", 9000))
API = os.getenv("api_docs", True)
if API:
docs_url = "/docs"
redoc_url = "/redoc"
else:
docs_url = None
redoc_url = None
# Helpful Globals
BASE_DIR = CWD
DATA_DIR = CWD.parent.joinpath("app_data")
if PRODUCTION:
DATA_DIR = Path("/app/data")
WEB_PATH = CWD.joinpath("dist")
IMG_DIR = DATA_DIR.joinpath("img")
BACKUP_DIR = DATA_DIR.joinpath("backups")
DEBUG_DIR = DATA_DIR.joinpath("debug")
MIGRATION_DIR = DATA_DIR.joinpath("migration")
NEXTCLOUD_DIR = MIGRATION_DIR.joinpath("nextcloud")
CHOWDOWN_DIR = MIGRATION_DIR.joinpath("chowdown")
TEMPLATE_DIR = DATA_DIR.joinpath("templates")
SQLITE_DIR = DATA_DIR.joinpath("db")
TEMP_DIR = DATA_DIR.joinpath(".temp")
@@ -52,23 +35,31 @@ REQUIRED_DIRS = [
MIGRATION_DIR,
TEMPLATE_DIR,
SQLITE_DIR,
NEXTCLOUD_DIR,
CHOWDOWN_DIR,
]
ensure_dirs()
APP_VERSION = "v0.2.0"
# General
PRODUCTION = os.environ.get("ENV")
PORT = int(os.getenv("mealie_port", 9000))
API = os.getenv("api_docs", True)
if API:
docs_url = "/docs"
redoc_url = "/redoc"
else:
docs_url = None
redoc_url = None
# DATABASE ENV
SQLITE_FILE = None
DATABASE_TYPE = os.getenv("db_type", "sqlite")
# DATABASE ENV
DATABASE_TYPE = os.getenv("db_type", "sqlite") # mongo, sqlite
if DATABASE_TYPE == "sqlite":
USE_SQL = True
SQLITE_FILE = SQLITE_DIR.joinpath(f"mealie_{APP_VERSION}.sqlite")
else:
raise Exception(
"Unable to determine database type. Acceptible options are 'sqlite' "
"Unable to determine database type. Acceptible options are 'mongo' or 'tinydb' "
)
# Mongo Database
@@ -81,3 +72,6 @@ DB_PORT = os.getenv("db_port", 27017)
# SFTP Email Stuff - For use Later down the line!
SFTP_USERNAME = os.getenv("sftp_username", None)
SFTP_PASSWORD = os.getenv("sftp_password", None)
ensure_dirs()

View File

@@ -98,7 +98,7 @@ def import_database(
return imported
@router.delete("/{file_name}/delete", status_code=200)
@router.delete("/{file_name}/delete", tags=["Import / Export"], status_code=200)
def delete_backup(file_name: str):
""" Removes a database backup from the file system """

View File

@@ -1,6 +1,7 @@
import json
import os
from app_config import APP_VERSION, DEBUG_DIR
from app_config import DEBUG_DIR
from fastapi import APIRouter
from fastapi.responses import HTMLResponse
from utils.logger import LOGGER_FILE
@@ -8,12 +9,6 @@ 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 """

5
mealie/run.sh Normal file
View File

@@ -0,0 +1,5 @@
## Run Migration
## Start Application
uvicorn app:app --host 0.0.0.0 --port 80