diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 771fa33e412..25be5d5fd32 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -41,24 +41,4 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.DISCORD_NIGHTLY_WEBHOOK }} uses: Ilshidur/action-discord@0.3.2 with: - args: "๐Ÿš€ New builds of mealie:api-nightly, mealie:frontend-nightly, and mealie:omni-nightly are available" - - deploy-demo: - runs-on: ubuntu-latest - name: Deploy Demo - needs: - - build-release - steps: - - name: Clean and Deploy Demo - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.DEMO_SERVER_IP }} - username: ${{ secrets.DEMO_SERVER_USER }} - key: ${{ secrets.DEMO_SERVER_SSH_KEY }} - port: ${{ secrets.DEMO_SERVER_PORT }} - script_stop: true - script: | - cd ~/docker/mealie - docker-compose pull - docker-compose down -v - docker-compose up -d + args: "๐Ÿš€ New builds of ghcr.io/mealie-recipes/mealie:nightly" diff --git a/.github/workflows/partial-builder.yml b/.github/workflows/partial-builder.yml index 159bb5505bd..5cd22a7ef95 100644 --- a/.github/workflows/partial-builder.yml +++ b/.github/workflows/partial-builder.yml @@ -13,163 +13,37 @@ on: required: true jobs: - build-frontend: + publish: runs-on: ubuntu-latest - name: Build Frontend + permissions: + contents: read + packages: write steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v3 - - name: Set up QEMU - id: qemu - uses: docker/setup-qemu-action@v2 - with: - image: tonistiigi/binfmt:latest - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - with: - install: true - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: | - hkotel/mealie - ghcr.io/${{ github.repository }} - - - name: Build and push Frontend images - uses: docker/build-push-action@v4 - with: - file: docker/frontend.Dockerfile - context: . - push: true - tags: frontend-${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - - build-backend: - runs-on: ubuntu-latest - name: Build Backend - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - id: qemu - uses: docker/setup-qemu-action@v2 - with: - image: tonistiigi/binfmt:latest - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - with: - install: true - - - name: Login to Docker Hub uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Override __init__.py - run: | - echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py - - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: | - hkotel/mealie - ghcr.io/${{ github.repository }} - - - name: Build and push API images - uses: docker/build-push-action@v4 - with: - file: docker/api.Dockerfile - context: . - push: true - tags: api-${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - - build-omni: - runs-on: ubuntu-latest - name: Build Omni - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU - id: qemu uses: docker/setup-qemu-action@v2 - with: - image: tonistiigi/binfmt:latest - platforms: all - name: Set up Docker Buildx - id: buildx uses: docker/setup-buildx-action@v2 - with: - install: true - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Override __init__.py run: | echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: | - hkotel/mealie - ghcr.io/${{ github.repository }} - - - name: Build and push API images + - name: Build and push Docker image uses: docker/build-push-action@v4 with: - file: docker/omni.Dockerfile + file: ./docker/Dockerfile context: . - push: true - tags: omni-${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 + push: true + tags: ghcr.io/${{ github.repository }}:${{ inputs.tag }} diff --git a/.github/workflows/partial-trivy-backend-container-scanning.yml b/.github/workflows/partial-trivy-container-scanning.yml similarity index 80% rename from .github/workflows/partial-trivy-backend-container-scanning.yml rename to .github/workflows/partial-trivy-container-scanning.yml index e0fb3e844f6..1305bdfca84 100644 --- a/.github/workflows/partial-trivy-backend-container-scanning.yml +++ b/.github/workflows/partial-trivy-container-scanning.yml @@ -1,11 +1,11 @@ -name: Trivy Backend Container Scanning +name: Trivy Container Scanning on: workflow_call: jobs: build: - name: Build and Scan Backend Container + name: Build and Scan Container runs-on: ubuntu-latest strategy: fail-fast: true @@ -15,7 +15,7 @@ jobs: - name: Build Dockerfile run: | - docker build -t mealie --file=./docker/api.Dockerfile . + docker build -t mealie --file=./docker/Dockerfile . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master diff --git a/.github/workflows/partial-trivy-frontend-container-scanning.yml b/.github/workflows/partial-trivy-frontend-container-scanning.yml deleted file mode 100644 index 43d8db9a8b0..00000000000 --- a/.github/workflows/partial-trivy-frontend-container-scanning.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Trivy Frontend Container Scanning - -on: - workflow_call: - -jobs: - build: - name: Build and Scan Frontend Container - runs-on: ubuntu-latest - strategy: - fail-fast: true - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Build Dockerfile - run: | - docker build -t mealie --file=./docker/frontend.Dockerfile . - - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master - with: - ignore-unfixed: true - image-ref: "mealie" - format: "sarif" - output: "trivy-results.sarif" - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: "trivy-results.sarif" diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 0dce5cbc75b..b7619be8b38 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -14,10 +14,6 @@ jobs: name: "Frontend and End-to-End Tests" uses: ./.github/workflows/partial-frontend.yml - backend-container-scanning: - name: "Trivy Backend Container Scanning" - uses: ./.github/workflows/partial-trivy-backend-container-scanning.yml - - frontend-container-scanning: - name: "Trivy Frontend Container Scanning" - uses: ./.github/workflows/partial-trivy-frontend-container-scanning.yml + container-scanning: + name: "Trivy Container Scanning" + uses: ./.github/workflows/partial-trivy-container-scanning.yml diff --git a/docker/omni.Dockerfile b/docker/Dockerfile similarity index 93% rename from docker/omni.Dockerfile rename to docker/Dockerfile index b86720d13ba..bc73f9ba5b4 100644 --- a/docker/omni.Dockerfile +++ b/docker/Dockerfile @@ -12,14 +12,7 @@ RUN yarn install \ # https://github.com/docker/build-push-action/issues/471 --network-timeout 1000000 -RUN yarn build - -RUN rm -rf node_modules && \ - NODE_ENV=production yarn install \ - --prefer-offline \ - --pure-lockfile \ - --non-interactive \ - --production=true +RUN yarn generate ############################################### # Base Image - Python @@ -150,12 +143,13 @@ HEALTHCHECK CMD python $MEALIE_HOME/mealie/scripts/healthcheck.py || exit 1 # Copy Frontend # copying caddy into image -COPY --from=builder /app $MEALIE_HOME/frontend/ +ENV STATIC_FILES=/spa/static +COPY --from=builder /app/dist ${STATIC_FILES} ENV HOST 0.0.0.0 EXPOSE ${APP_PORT} -COPY ./docker/omni.entry.sh $MEALIE_HOME/run.sh +COPY ./docker/entry.sh $MEALIE_HOME/run.sh RUN chmod +x $MEALIE_HOME/run.sh ENTRYPOINT $MEALIE_HOME/run.sh diff --git a/docker/api.Dockerfile b/docker/api.Dockerfile deleted file mode 100644 index 5e14de30a38..00000000000 --- a/docker/api.Dockerfile +++ /dev/null @@ -1,115 +0,0 @@ -############################################### -# Base Image -############################################### -FROM python:3.10-slim as python-base - -ENV MEALIE_HOME="/app" - -ENV PYTHONUNBUFFERED=1 \ - PYTHONDONTWRITEBYTECODE=1 \ - PIP_NO_CACHE_DIR=off \ - PIP_DISABLE_PIP_VERSION_CHECK=on \ - PIP_DEFAULT_TIMEOUT=100 \ - POETRY_HOME="/opt/poetry" \ - POETRY_VIRTUALENVS_IN_PROJECT=true \ - POETRY_NO_INTERACTION=1 \ - PYSETUP_PATH="/opt/pysetup" \ - VENV_PATH="/opt/pysetup/.venv" - -# prepend poetry and venv to path -ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH" - -# create user account -RUN useradd -u 911 -U -d $MEALIE_HOME -s /bin/bash abc \ - && usermod -G users abc \ - && mkdir $MEALIE_HOME - -############################################### -# Builder Image -############################################### -FROM python-base as builder-base -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - curl \ - build-essential \ - libpq-dev \ - libwebp-dev \ - tesseract-ocr-all \ - # LDAP Dependencies - libsasl2-dev libldap2-dev libssl-dev \ - gnupg gnupg2 gnupg1 \ - && pip install -U --no-cache-dir pip - -# install poetry - respects $POETRY_VERSION & $POETRY_HOME -ENV POETRY_VERSION=1.3.1 -RUN curl -sSL https://install.python-poetry.org | python3 - - -# copy project requirement files here to ensure they will be cached. -WORKDIR $PYSETUP_PATH -COPY ./poetry.lock ./pyproject.toml ./ - -# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally -RUN poetry install -E pgsql --only main - -############################################### -# CRFPP Image -############################################### -FROM hkotel/crfpp as crfpp - -RUN echo "crfpp-container" - -############################################### -# Production Image -############################################### -FROM python-base as production -ENV PRODUCTION=true -ENV TESTING=false - -ARG COMMIT -ENV GIT_COMMIT_HASH=$COMMIT - -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - gosu \ - iproute2 \ - tesseract-ocr-all \ - libldap-common \ - && apt-get autoremove \ - && rm -rf /var/lib/apt/lists/* - -# copying poetry and venv into image -COPY --from=builder-base $POETRY_HOME $POETRY_HOME -COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH - -ENV LD_LIBRARY_PATH=/usr/local/lib -COPY --from=crfpp /usr/local/lib/ /usr/local/lib -COPY --from=crfpp /usr/local/bin/crf_learn /usr/local/bin/crf_learn -COPY --from=crfpp /usr/local/bin/crf_test /usr/local/bin/crf_test - -# copy backend -COPY ./mealie $MEALIE_HOME/mealie -COPY ./poetry.lock ./pyproject.toml $MEALIE_HOME/ -COPY ./gunicorn_conf.py $MEALIE_HOME - -# Alembic -COPY ./alembic $MEALIE_HOME/alembic -COPY ./alembic.ini $MEALIE_HOME/ - -# venv already has runtime deps installed we get a quicker install -WORKDIR $MEALIE_HOME -RUN . $VENV_PATH/bin/activate && poetry install -E pgsql --only main -WORKDIR / - -# Grab CRF++ Model Release -RUN python $MEALIE_HOME/mealie/scripts/install_model.py - -VOLUME [ "$MEALIE_HOME/data/" ] -ENV APP_PORT=9000 - -EXPOSE ${APP_PORT} - -HEALTHCHECK CMD python $MEALIE_HOME/mealie/scripts/healthcheck.py || exit 1 - -COPY ./docker/api.entry.sh $MEALIE_HOME/mealie/run.sh -RUN chmod +x $MEALIE_HOME/mealie/run.sh -ENTRYPOINT $MEALIE_HOME/mealie/run.sh diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ce59fc9fba8..00f5c3cb994 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,58 +1,20 @@ version: "3.4" services: - mealie-frontend: - container_name: mealie-frontend - image: mealie-frontend:dev - deploy: - resources: - limits: - memory: 500M - build: - context: ../ - dockerfile: ./docker/frontend.Dockerfile - restart: always - volumes: - - mealie-data:/app/data/ - ports: - - 9091:3000 - environment: - - API_URL=http://mealie-api:9000 - - # ===================================== - # Light Mode Config - - THEME_LIGHT_PRIMARY=#E58325 - - THEME_LIGHT_ACCENT=#007A99 - - THEME_LIGHT_SECONDARY=#973542 - - THEME_LIGHT_SUCCESS=#43A047 - - THEME_LIGHT_INFO=#1976D2 - - THEME_LIGHT_WARNING=#FF6D00 - - THEME_LIGHT_ERROR=#EF5350 - # ===================================== - # Dark Mode Config - - THEME_DARK_PRIMARY=#E58325 - - THEME_DARK_ACCENT=#007A99 - - THEME_DARK_SECONDARY=#973542 - - THEME_DARK_SUCCESS=#43A047 - - THEME_DARK_INFO=#1976D2 - - THEME_DARK_WARNING=#FF6D00 - - THEME_DARK_ERROR=#EF5350 mealie: - container_name: mealie-api - deploy: - resources: - limits: - memory: 1000M + container_name: mealie + image: mealie:dev build: context: ../ target: production - dockerfile: ./docker/api.Dockerfile + dockerfile: ./docker/Dockerfile restart: always volumes: - mealie-data:/app/data/ ports: - - 9092:9000 + - 9091:9000 environment: ALLOW_SIGNUP: "false" + DB_ENGINE: sqlite # Optional: 'sqlite', 'postgres' # ===================================== # Postgres Config @@ -78,14 +40,6 @@ services: # SMTP_USER= # SMTP_PASSWORD= - # postgres: - # container_name: postgres - # image: postgres - # restart: always - # environment: - # POSTGRES_PASSWORD: mealie - # POSTGRES_USER: mealie - volumes: mealie-data: driver: local diff --git a/docker/api.entry.sh b/docker/entry.sh similarity index 91% rename from docker/api.entry.sh rename to docker/entry.sh index cbbd5cb9f53..9bbddf1ecf3 100644 --- a/docker/api.entry.sh +++ b/docker/entry.sh @@ -1,9 +1,9 @@ +# Start Backend API #!/bin/bash -set -e - -# Get Reload Arg `run.sh reload` for dev server -ARG1=${1:-production} +# Strict Mode +# set -e +# IFS=$'\n\t' # Get PUID/PGID PUID=${PUID:-911} @@ -41,12 +41,8 @@ init() { poetry run python /app/mealie/db/init_db.py } -echo "Production" - -change_user - +# change_user init - GUNICORN_PORT=${API_PORT:-9000} # Start API diff --git a/docker/frontend.Caddyfile b/docker/frontend.Caddyfile deleted file mode 100644 index 4cecca23428..00000000000 --- a/docker/frontend.Caddyfile +++ /dev/null @@ -1,46 +0,0 @@ -{ - auto_https off - admin off -} - -:3000 { - @apidocs path /docs /openapi.json - - @static { - file - path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp - } - - encode gzip zstd - - # Handles Recipe Images / Assets - handle_path /api/media/recipes/* { - header @static Cache-Control max-age=31536000 - root * /app/data/recipes/ - file_server - } - - # Handles User Images - handle_path /api/media/users/* { - header @static Cache-Control max-age=31536000 - root * /app/data/users/ - file_server - } - - # Handle Docker Volume Validation File - handle_path /api/media/docker/* { - root * /app/data/docker-validation/ - file_server - } - - - handle @apidocs { - uri strip_suffix / - reverse_proxy {$API_URL} - } - - handle { - uri strip_suffix / - reverse_proxy http://127.0.0.1:3001 - } -} diff --git a/docker/frontend.Dockerfile b/docker/frontend.Dockerfile deleted file mode 100644 index b397d5affc6..00000000000 --- a/docker/frontend.Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM node:16 as builder - -WORKDIR /app - -COPY ./frontend . - -RUN yarn install \ - --prefer-offline \ - --frozen-lockfile \ - --non-interactive \ - --production=false \ - # https://github.com/docker/build-push-action/issues/471 - --network-timeout 1000000 - -RUN yarn build - -RUN rm -rf node_modules && \ - NODE_ENV=production yarn install \ - --prefer-offline \ - --pure-lockfile \ - --non-interactive \ - --production=true - -FROM node:16-alpine - -RUN apk add caddy - -WORKDIR /app - -# copying caddy into image -COPY --from=builder /app . -COPY ./docker/frontend.Caddyfile /app/Caddyfile -COPY ./docker/frontend.entry.sh /app/run.sh - -ENV HOST 0.0.0.0 -EXPOSE 3000 - -RUN chmod +x /app/run.sh -ENTRYPOINT /app/run.sh diff --git a/docker/frontend.entry.sh b/docker/frontend.entry.sh deleted file mode 100644 index d15c3f62f5c..00000000000 --- a/docker/frontend.entry.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Production entry point for the frontend docker container - -# Web Server -caddy start --config /app/Caddyfile - -# Start Node Application -yarn start -p 3001 diff --git a/docker/omni.docker-compose.yml b/docker/omni.docker-compose.yml deleted file mode 100644 index 6f57bc4f700..00000000000 --- a/docker/omni.docker-compose.yml +++ /dev/null @@ -1,45 +0,0 @@ -version: "3.4" -services: - omni-mealie: - container_name: mealie - image: mealie-omni:dev - build: - context: ../ - target: production - dockerfile: ./docker/omni.Dockerfile - restart: always - volumes: - - mealie-data:/app/data/ - ports: - - 9091:3000 - environment: - ALLOW_SIGNUP: "false" - - DB_ENGINE: sqlite # Optional: 'sqlite', 'postgres' - # ===================================== - # Postgres Config - POSTGRES_USER: mealie - POSTGRES_PASSWORD: mealie - POSTGRES_SERVER: postgres - POSTGRES_PORT: 5432 - POSTGRES_DB: mealie - - # ===================================== - # Web Concurrency - WEB_GUNICORN: "false" - WORKERS_PER_CORE: 0.5 - MAX_WORKERS: 1 - WEB_CONCURRENCY: 1 - # ===================================== - # Email Configuration - # SMTP_HOST= - # SMTP_PORT=587 - # SMTP_FROM_NAME=Mealie - # SMTP_AUTH_STRATEGY=TLS # Options: 'TLS', 'SSL', 'NONE' - # SMTP_FROM_EMAIL= - # SMTP_USER= - # SMTP_PASSWORD= - -volumes: - mealie-data: - driver: local diff --git a/docker/omni.entry.sh b/docker/omni.entry.sh deleted file mode 100644 index e53084d7bf8..00000000000 --- a/docker/omni.entry.sh +++ /dev/null @@ -1,59 +0,0 @@ -# Start Backend API -#!/bin/bash - -# Strict Mode -# set -e -# IFS=$'\n\t' - -# Get PUID/PGID -PUID=${PUID:-911} -PGID=${PGID:-911} - -add_user() { - groupmod -o -g "$PGID" abc - usermod -o -u "$PUID" abc -} - -change_user() { - # If container is started as root then create a new user and switch to it - if [ "$(id -u)" = "0" ]; then - add_user - chown -R $PUID:$PGID /app - - echo "Switching to dedicated user" - exec gosu $PUID "$BASH_SOURCE" "$@" - elif [ "$(id -u)" = $PUID ]; then - echo " - User uid: $PUID - User gid: $PGID - " - fi -} - -init() { - # $MEALIE_HOME directory - cd /app - - # Activate our virtual environment here - . /opt/pysetup/.venv/bin/activate - - # Initialize Database Prerun - poetry run python /app/mealie/db/init_db.py -} - -# change_user -init -GUNICORN_PORT=${API_PORT:-9000} - -# Start API -hostip=`/sbin/ip route|awk '/default/ { print $3 }'` -if [ "$WEB_GUNICORN" = 'true' ]; then - echo "Starting Gunicorn" - gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT --forwarded-allow-ips=$hostip -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload & -else - uvicorn mealie.app:app --host 0.0.0.0 --forwarded-allow-ips=$hostip --port $GUNICORN_PORT & -fi - -# ------------------------------ -# Start Frontend Nuxt Server -cd /app/frontend && yarn start -p 3000 diff --git a/docs/docs/documentation/getting-started/installation/frontend-config.md b/docs/docs/documentation/getting-started/installation/frontend-config.md deleted file mode 100644 index ad1c28ba733..00000000000 --- a/docs/docs/documentation/getting-started/installation/frontend-config.md +++ /dev/null @@ -1,29 +0,0 @@ -# Frontend Configuration - -## Environment Variables - -### General - -| Variables | Default | Description | -| --------- | :--------------------: | ------------------------- | -| API_URL | http://mealie-api:9000 | URL to proxy API requests | - -### Themeing -Setting the following environmental variables will change the theme of the frontend. Note that the themes are the same for all users. This is a break-change when migration from v0.x.x -> 1.x.x. - -| Variables | Default | Description | -| --------------------- | :-----: | --------------------------- | -| THEME_LIGHT_PRIMARY | #E58325 | Light Theme Config Variable | -| THEME_LIGHT_ACCENT | #007A99 | Light Theme Config Variable | -| THEME_LIGHT_SECONDARY | #973542 | Light Theme Config Variable | -| THEME_LIGHT_SUCCESS | #43A047 | Light Theme Config Variable | -| THEME_LIGHT_INFO | #1976D2 | Light Theme Config Variable | -| THEME_LIGHT_WARNING | #FF6D00 | Light Theme Config Variable | -| THEME_LIGHT_ERROR | #EF5350 | Light Theme Config Variable | -| THEME_DARK_PRIMARY | #E58325 | Dark Theme Config Variable | -| THEME_DARK_ACCENT | #007A99 | Dark Theme Config Variable | -| THEME_DARK_SECONDARY | #973542 | Dark Theme Config Variable | -| THEME_DARK_SUCCESS | #43A047 | Dark Theme Config Variable | -| THEME_DARK_INFO | #1976D2 | Dark Theme Config Variable | -| THEME_DARK_WARNING | #FF6D00 | Dark Theme Config Variable | -| THEME_DARK_ERROR | #EF5350 | Dark Theme Config Variable | diff --git a/docs/docs/documentation/getting-started/installation/installation-checklist.md b/docs/docs/documentation/getting-started/installation/installation-checklist.md index 99e81baae2f..f70c859ffec 100644 --- a/docs/docs/documentation/getting-started/installation/installation-checklist.md +++ b/docs/docs/documentation/getting-started/installation/installation-checklist.md @@ -55,10 +55,8 @@ After you've decided setup the files it's important to set a few ENV variables t - [x] You've configured the relevant ENV variables for your database selection in the `docker-compose.yaml` files. - [x] You've configured the [SMTP server settings](./backend-config.md#email) (used for invitations, password resets, etc). You can setup a [google app password](https://support.google.com/accounts/answer/185833?hl=en) if you want to send email via gmail. -- [x] Verified the port mapped on the `mealie-frontend` container is an open port on your server (Default: 9925) - [x] You've set the [`BASE_URL`](./backend-config.md#general) variable. - [x] You've set the `DEFAULT_EMAIL` and `DEFAULT_GROUP` variable. -- [x] Make any theme changes on the frontend container. [See Frontend Config](./frontend-config.md#themeing) ## Step 3: Startup After you've configured your database, and updated the `docker-compose.yaml` files, you can start Mealie by running the following command in the directory where you've added your `docker-compose.yaml`. @@ -79,9 +77,6 @@ You should see the containers start up without error. You should now be able to After the startup is complete you should see a login screen. Use the default credentials above to login and navigate to `/admin/site-settings`. Here you'll find a summary of your configuration details and their respective status. Before proceeding you should validate that the configuration is correct. For any warnings or errors the page will display an error and notify you of what you need to verify. -!!! tip "Docker Volume" - Mealie uses a shared data-volume between the Backend and Frontend containers for images and assets. Ensure that this is configured correctly by using the "Docker Volume Test" section in the settings page. Running this validation will ensure that you have configured your volumes correctly. Mealie will not work correctly without this configured correctly. - ## Step 5: Backup While v1.0.0 is a great step to data-stability and security, it's not a backup. Mealie provides a full site data backup mechanism through the UI. @@ -91,23 +86,18 @@ These backups are just plain .zip files that you can download from the UI or acc ### Docker Tags -`mealie:frontend-v1.0.0beta-x` **and** `mealie:api-v1.0.0beta-x` - -These are the tags for the latest beta release of the frontend docker-container. These are currently considered the latest and most stable releases and the recommended way of using Mealie. - -`mealie:frontend-nightly`**and** `mealie:api-nightly` +`ghcr.io/mealie-recipes/mealie:nightly` The nightly build are the latest and greatest builds that are built directly off of every commit to the `mealie-next` branch and as such may contain bugs. These are great to help the community catch bugs before they hit the stable release or if you like living on the edge. +--- -### Docker Diagram +**These tags no are long updated** -While the docker-compose file should work without modification, some users want to tailor it to their installation. This diagram shows network and volume architecture for the default setup. You can use this to help you customize your configuration. +`mealie:frontend-v1.0.0beta-x` **and** `mealie:api-v1.0.0beta-x` -![Docker Diagram](../../../assets/img/docker-diagram.drawio.svg) +These are the tags for the latest beta release of the frontend docker-container. These are currently considered the latest and most stable releases and the recommended way of using Mealie. -In the diagram above there's a few crucial things to note. +`mealie:frontend-nightly`**and** `mealie:api-nightly` -1. Port 9925 is the host port, this can be anything you want. The important part is that it's mapped to the mealie-frontend container at port 3000. -2. The mealie-frontend container communicated with the mealie-api container through the INTERNAL docker network. This requires that the two containers are on the same network and that the network supports name resolution (anything but the default bridge network). The resolution URL can be specified in the docker-compose as the `API_URL` environment variable. The API_URL must match the network name of the mealie-backend container, which should be the same as the container name (e.g. a container renamed to `my-api` should have an `API_URL` set to `http://my-api: -1. Whoa whoa whoa, what is this nonsense? The API_URL is the URL the frontend container uses to proxy api requests to the backend server. In this example, the name `mealie-api` resolves to the `mealie-api` container which runs the API server on port 9000. This allows you to access the API without exposing an additional port on the host. -

**Note** that both containers must be on the same docker-network for this to work. -2. To access the mealie interface you only need to expose port 3000 on the mealie-frontend container. Here we expose port 9925 on the host, feel free to change this to any port you like. -3. Mounting the data directory to the frontend is now required to access the images/assets directory. This can be mounted read-only. Internally the frontend containers runs a Caddy proxy server that serves the assets requested to reduce load on the backend API. -4. Setting an explicit memory limit is recommended. Python can pre-allocate larger amounts of memory than is necessary if you have a machine with a lot of RAM. This can cause the container to idle at a high memory usage. Setting a memory limit will improve idle performance. +1. To access the mealie interface you only need to expose port 9000 on the mealie-frontend container. Here we expose port 9925 on the host, feel free to change this to any port you like. +2. Setting an explicit memory limit is recommended. Python can pre-allocate larger amounts of memory than is necessary if you have a machine with a lot of RAM. This can cause the container to idle at a high memory usage. Setting a memory limit will improve idle performance. diff --git a/docs/docs/documentation/getting-started/installation/single-container.md b/docs/docs/documentation/getting-started/installation/single-container.md deleted file mode 100644 index a1e7e3fbccf..00000000000 --- a/docs/docs/documentation/getting-started/installation/single-container.md +++ /dev/null @@ -1,37 +0,0 @@ -# Using the Omni Image - -Since [#1948](https://github.com/hay-kot/mealie/pull/1948) we've started publishing an experimental image that merges both the frontend and backend services into a single container image. This image is currently in an experimental state, and should be used with caution. Continued support for this image will be based on user feedback and demand, if you're using this image please let us know how it's working for you. The single container comes with SQLite, and can be used with PostgreSQL by adding a postgres container to the docker-compose file (see the [PostgreSQL install](./postgres.md) for a snippet). - -- [Feedback Discussion](https://github.com/hay-kot/mealie/discussions/1949) - -**For Environmental Variable Configuration See:** - -Note that frontend and backend configurations are both applied to the same container. The container exposes the port 9000 for the API and port 3000 for the frontend. - -- [Frontend Configuration](./frontend-config.md) -- [Backend Configuration](./backend-config.md) - -```yaml ---- -version: "3.7" -services: - mealie-omni: - image: hkotel/mealie:omni-nightly - container_name: mealie - ports: - - "3000:3000" - - "9000:9000" - volumes: - - mealie-data:/app/data/ - environment: - - ALLOW_SIGNUP=true - - PUID=1000 - - PGID=1000 - - TZ=America/Anchorage - - BASE_URL=https://mealie.yourdomain.com - restart: always - -volumes: - mealie-data: - driver: local -``` diff --git a/docs/docs/documentation/getting-started/installation/sqlite.md b/docs/docs/documentation/getting-started/installation/sqlite.md index aa03423475f..7a55b2fade3 100644 --- a/docs/docs/documentation/getting-started/installation/sqlite.md +++ b/docs/docs/documentation/getting-started/installation/sqlite.md @@ -4,31 +4,21 @@ SQLite is a popular, open source, self-contained, zero-configuration database th **For Environmental Variable Configuration See:** -- [Frontend Configuration](./frontend-config.md) -- [Backend Configuration](./backend-config.md) +- [Configuration](./backend-config.md) ```yaml --- version: "3.7" services: - mealie-frontend: - image: hkotel/mealie:frontend-v1.0.0beta-5 - container_name: mealie-frontend - environment: - # Set Frontend ENV Variables Here - - API_URL=http://mealie-api:9000 # (1) - restart: always - ports: - - "9925:3000" # (2) - volumes: - - mealie-data:/app/data/ # (3) mealie-api: - image: hkotel/mealie:api-v1.0.0beta-5 + image: ghcr.io/mealie-recipes/mealie:nightly container_name: mealie-api + ports: + "9925:9000" # (1) deploy: resources: limits: - memory: 1000M # (4) + memory: 1000M # (2) volumes: - mealie-data:/app/data/ environment: @@ -49,8 +39,5 @@ volumes: -1. Whoa whoa whoa, what is this nonsense? The API_URL is the URL the frontend container uses to proxy api requests to the backend server. In this example, the name `mealie-api` resolves to the `mealie-api` container which runs the API server on port 9000. This allows you to access the API without exposing an additional port on the host. -

**Note** that both containers must be on the same docker-network for this to work. -2. To access the mealie interface you only need to expose port 3000 on the mealie-frontend container. Here we expose port 9925 on the host, feel free to change this to any port you like. -3. Mounting the data directory to the frontend is now required to access the images/assets directory. This can be mounted read-only. Internally the frontend containers runs a Caddy proxy server that serves the assets requested to reduce load on the backend API. -4. Setting an explicit memory limit is recommended. Python can pre-allocate larger amounts of memory than is necessary if you have a machine with a lot of RAM. This can cause the container to idle at a high memory usage. Setting a memory limit will improve idle performance. +1. To access the mealie interface you only need to expose port 9000 on the mealie-frontend container. Here we expose port 9925 on the host, feel free to change this to any port you like. +2. Setting an explicit memory limit is recommended. Python can pre-allocate larger amounts of memory than is necessary if you have a machine with a lot of RAM. This can cause the container to idle at a high memory usage. Setting a memory limit will improve idle performance. diff --git a/docs/docs/overrides/api.html b/docs/docs/overrides/api.html index 3457007ea0f..b0600f327d6 100644 --- a/docs/docs/overrides/api.html +++ b/docs/docs/overrides/api.html @@ -14,7 +14,7 @@
diff --git a/docs/docs/overrides/home.html b/docs/docs/overrides/home.html index e00ceac8efe..8112b3153bc 100644 --- a/docs/docs/overrides/home.html +++ b/docs/docs/overrides/home.html @@ -315,8 +315,8 @@

Groups

- Sort users into groups to share recipes and mealplans with the whole family while keeping - your cooking club separate. + Full multi-user support with groups for sharing recipes and meal plans + with family.

diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 94f3b2658cb..0a514679a0b 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -71,8 +71,6 @@ nav: - Installation Checklist: "documentation/getting-started/installation/installation-checklist.md" - SQLite (Recommended): "documentation/getting-started/installation/sqlite.md" - PostgreSQL: "documentation/getting-started/installation/postgres.md" - - Single Container (Experimental): "documentation/getting-started/installation/single-container.md" - - Frontend Configuration: "documentation/getting-started/installation/frontend-config.md" - Backend Configuration: "documentation/getting-started/installation/backend-config.md" - Usage: - Backup and Restoring: "documentation/getting-started/usage/backups-and-restoring.md" diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue index 2d0fc87b7dc..fc0567b0748 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue @@ -1,7 +1,13 @@