diff --git a/Dockerfile b/Dockerfile index c79a16c3a8ba..e98a95f734c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,4 +21,6 @@ COPY ./mealie /app COPY ./mealie/data/templates/recipes.md /app/data/templates/ COPY --from=build-stage /app/dist /app/dist +ENV ENV prod + CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "9000"] \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 7e55d60080cd..725d6e3fdd10 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -11,7 +11,7 @@ WORKDIR /app RUN pip install -r requirements.txt -# COPY ./mealie /app +COPY ./mealie /app ENTRYPOINT [ "python" ] diff --git a/dev/dev-notes.md b/dev/dev-notes.md index 95cd32e1cb52..eced010a5e1b 100644 --- a/dev/dev-notes.md +++ b/dev/dev-notes.md @@ -41,3 +41,17 @@ Backend # Draft Changelog ## v0.0.2 +General +- Fixed opacity issues with marked steps - [mtoohey31](https://github.com/mtoohey31) +- Updated Favicon +- Renamed Frontend Window +- Added Debug folder to dump scraper data prior to processing. +- Improved documentation +- Added version tag / relevant links, and new version notifier +- Fixed hot-reloading development environment - [grssmnn][https://github.com/grssmnn] + + +Recipes +- Added user feedback on bad URL. +- Better backend data validation for updating recipes, avoid small syntax errors corrupting database entry. [Issue #8](https://github.com/hay-kot/mealie/issues/8) +- Fixed spacing issue while editing new recipes in JSON diff --git a/dev/scripts/docker-compose.dev.sh b/dev/scripts/docker-compose.dev.sh index 3a4741345c0e..485e52f6661a 100755 --- a/dev/scripts/docker-compose.dev.sh +++ b/dev/scripts/docker-compose.dev.sh @@ -1 +1 @@ -docker-compose -f docker-compose.dev.yml build && docker-compose -f docker-compose.dev.yml -p dev-mealie up -d \ No newline at end of file +docker-compose -f docker-compose.dev.yml -p dev-mealie up --build \ No newline at end of file diff --git a/dev/scripts/docker-compose.sh b/dev/scripts/docker-compose.sh index 3336c7bc5227..e2fd9edcd926 100755 --- a/dev/scripts/docker-compose.sh +++ b/dev/scripts/docker-compose.sh @@ -1 +1 @@ -docker-compose build && docker-compose -p mealie up -d \ No newline at end of file +docker-compose -p mealie up --build \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index d9b9d4879f48..72b5f9a8415f 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -2,23 +2,26 @@ version: "3.1" services: # Vue Frontend - mealie: + mealie-frontend: + image: mealie-frontend:dev build: context: ./frontend dockerfile: frontend.Dockerfile - container_name: mealie_frontend restart: always ports: - 9920:8080 + environment: + VUE_APP_API_BASE_URL: "http://mealie-api:9000" volumes: - - ./frontend:/app + - ./frontend/:/app + - /app/node_modules # Fast API mealie-api: + image: mealie-api:dev build: context: ./ dockerfile: Dockerfile.dev - container_name: mealie-api restart: always ports: - 9921:9000 diff --git a/frontend/frontend.Dockerfile b/frontend/frontend.Dockerfile index 2cdab5876dc9..92f6eed1b673 100644 --- a/frontend/frontend.Dockerfile +++ b/frontend/frontend.Dockerfile @@ -13,7 +13,7 @@ COPY package*.json ./ RUN npm install # copy project files and folders to the current working directory (i.e. 'app' folder) -# COPY . . +COPY . . # build app for production with minification # RUN npm run build diff --git a/mealie/app.py b/mealie/app.py index 66034519e4cf..0893c0eac2f1 100644 --- a/mealie/app.py +++ b/mealie/app.py @@ -1,4 +1,5 @@ from pathlib import Path +import os import uvicorn from fastapi import FastAPI @@ -24,8 +25,10 @@ WEB_PATH = CWD.joinpath("dist") app = FastAPI() -# Mount Vue Frontend -app.mount("/static", StaticFiles(directory=WEB_PATH, html=True)) +# Mount Vue Frontend only in production +env = os.environ.get("ENV") +if(env == "prod"): + app.mount("/static", StaticFiles(directory=WEB_PATH, html=True)) # API Routes app.include_router(recipe_routes.router)