mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-24 16:53:12 -05:00
Compare commits
75 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fe0cdc8a4 | ||
|
|
8b07f4e9e0 | ||
|
|
445fed853f | ||
|
|
3cc3825bbe | ||
|
|
23026a4cc4 | ||
|
|
b558a50a7d | ||
|
|
8866256a21 | ||
|
|
7bcbe0464a | ||
|
|
f471e38d88 | ||
|
|
561f586dd1 | ||
|
|
38e4afcc3c | ||
|
|
c44edf97ae | ||
|
|
d0cc0a089a | ||
|
|
7188e58f4c | ||
|
|
40b78e427d | ||
|
|
c8e239bd81 | ||
|
|
cc35a4be19 | ||
|
|
b6111afe69 | ||
|
|
88baa46a33 | ||
|
|
732a2cbc51 | ||
|
|
34a10f375f | ||
|
|
f000dffde2 | ||
|
|
abcf40899f | ||
|
|
d6794cba7d | ||
|
|
016108d35f | ||
|
|
9b41990ea9 | ||
|
|
3cadc3d04b | ||
|
|
874bea7fa4 | ||
|
|
ce48ae61c7 | ||
|
|
c746f7f4f8 | ||
|
|
7f67f844bc | ||
|
|
079ebd8ee1 | ||
|
|
138093d062 | ||
|
|
99cf606a45 | ||
|
|
41e079d423 | ||
|
|
f35e9c20d6 | ||
|
|
51893e89cd | ||
|
|
76830802cc | ||
|
|
29db7f8a67 | ||
|
|
22a517b9c0 | ||
|
|
2ffaecb7b7 | ||
|
|
bfc28fc506 | ||
|
|
6ee4fc2ea6 | ||
|
|
567bff8b42 | ||
|
|
3a5f99919b | ||
|
|
d0f9917c6f | ||
|
|
d1fe1f44b8 | ||
|
|
b00b0c8af4 | ||
|
|
c6403a7998 | ||
|
|
a76f472aa4 | ||
|
|
6bc7c4ceb0 | ||
|
|
cf45fa0015 | ||
|
|
5b15ffdf5f | ||
|
|
53f15b17ea | ||
|
|
cbcbc3a339 | ||
|
|
9a616910f3 | ||
|
|
0167f2f1ca | ||
|
|
b689c4715b | ||
|
|
d0f89956f4 | ||
|
|
25988836c0 | ||
|
|
5f25b2492e | ||
|
|
4562a8ca10 | ||
|
|
80468d0c47 | ||
|
|
9efd9399d9 | ||
|
|
8d0604da3a | ||
|
|
9818d567b9 | ||
|
|
a4a33af1c3 | ||
|
|
965fa81d9b | ||
|
|
0eb1e952b2 | ||
|
|
021a9025da | ||
|
|
fe69114b0b | ||
|
|
296e24b119 | ||
|
|
4b0e9c0d76 | ||
|
|
9c1d0d9ec9 | ||
|
|
e7cb7c6cfd |
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -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"],
|
||||
|
||||
45
.vscode/tasks.json
vendored
45
.vscode/tasks.json
vendored
@@ -13,42 +13,15 @@
|
||||
"group": "test"
|
||||
},
|
||||
{
|
||||
"label": "Production: Build and Start Docker Compose",
|
||||
"command": "./dev/scripts/docker-compose.sh",
|
||||
"type": "shell",
|
||||
"args": [],
|
||||
"problemMatcher": ["$tsc"],
|
||||
"presentation": {
|
||||
"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": "Production: Build and Start Docker Compose",
|
||||
"command": "./dev/scripts/docker-compose.sh",
|
||||
"type": "shell",
|
||||
"args": [],
|
||||
"problemMatcher": ["$tsc"],
|
||||
"presentation": {
|
||||
"reveal": "always"
|
||||
},
|
||||
"group": "test"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Dev: Start local Frontend",
|
||||
"command": "npm run serve",
|
||||
"type": "shell",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/frontend/"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"group": "groupA"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
33
Dockerfile.arm
Normal 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
1
dev/scripts/buildx.sh
Normal file
@@ -0,0 +1 @@
|
||||
docker buildx build .
|
||||
0
dev/scripts/scrape_recipe.py
Executable file → Normal file
0
dev/scripts/scrape_recipe.py
Executable file → Normal file
17
dev/scripts/start-dev-svr.ps1
Normal file
17
dev/scripts/start-dev-svr.ps1
Normal 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
16
docker-compose.arm.yml
Normal 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
|
||||
@@ -10,3 +10,6 @@ services:
|
||||
- 9090:80
|
||||
environment:
|
||||
db_type: sqlite
|
||||
|
||||
# volumes:
|
||||
# - ./mealie/data/:/app/data
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
VUE_APP_API_BASE_URL=http://localhost:9000
|
||||
VUE_APP_API_BASE_URL=http://10.10.10.12:9921
|
||||
105
frontend/package-lock.json
generated
105
frontend/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
};
|
||||
@@ -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>
|
||||
<v-row dense>
|
||||
<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 });
|
||||
});
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 """
|
||||
|
||||
|
||||
@@ -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
5
mealie/run.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
## Run Migration
|
||||
|
||||
|
||||
## Start Application
|
||||
uvicorn app:app --host 0.0.0.0 --port 80
|
||||
Reference in New Issue
Block a user