Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration issues #4443

Open
starlord998 opened this issue Oct 24, 2024 · 10 comments
Open

Configuration issues #4443

starlord998 opened this issue Oct 24, 2024 · 10 comments

Comments

@starlord998
Copy link

Relatively new to docker. I have setup Mealie on my Synology NAS in a docker container with the following docker-compose.

version: "3.8"

services:
mealie:
image: ghcr.io/mealie-recipes/mealie:latest
container_name: mealie
restart: always
ports:
- "9925:9000" #
deploy:
resources:
limits:
memory: 1000M #
volumes:
- /volume1/docker/mealie/mealie-data:/app/data/
environment:
# Set Backend ENV Variables Here
ALLOW_SIGNUP: "true"
PUID: 1030
PGID: 100
TZ: America/Chicago
MAX_WORKERS: 1
WEB_CONCURRENCY: 1
BASE_URL: https://mealie.xxx.me
API_PORT: 9000
LOG_LEVEL: debug
# GMAIL
SMTP_HOST: smtp.gmail.com
SMTP_PORT: 587
SMTP_FROM_NAME: [email protected]
SMTP_AUTH_STRATEGY: TLS
SMTP_FROM_EMAIL: [email protected]
SMTP_USER: [email protected]
SMTP_PASSWORD:
# OPENAI
OPENAI_BASE_URL: https://api.openai.com/v1
OPENAI_MODEL: gpt-4
OPENAI_WORKERS: 2
OPENAI_CUSTOM_HEADERS:
OPENAI_CUSTOM_PARAMS:
OPENAI_REQUEST_TIMEOUT: 90
OPENAI_SEND_DATABASE_DATA: "true"
OPENAI_ENABLE_IMAGE_SERVICES: "True"
OPENAI_API_KEY:
# Database Settings
DB_ENGINE: postgres
POSTGRES_USER: mealie
POSTGRES_PASSWORD: mealie
POSTGRES_SERVER: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: mealie
depends_on:
postgres:
condition: service_healthy

postgres:
container_name: postgres
image: postgres:15
restart: always
volumes:
- /volume1/docker/mealie/mealie-pgdata:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: mealie
POSTGRES_USER: mealie
PGUSER: mealie
healthcheck:
test: ["CMD", "pg_isready"]
interval: 60s
timeout: 60s
retries: 3

volumes:
mealie-data:
mealie-pgdata:

I am able to deploy the container without errors and able to create the admin user and manually add recipes.

Issues:

  1. I am unable to Import recipes via URL: I get an error "looks like we couldn't find anything". I tried various sites such as allrecipes.com. I think I see the following in the logs INFO 2024-10-24T12:08:38 - [104.28.104.25:0] 405 Method Not Allowed "POST /api/recipes/create-url HTTP/1.1"
  2. When I go to site settings: the application versions (null) and the General About keeps saying "Loading"
  3. The OpenAI is not ready: I have a paid subscription to OpenAI and create the API key but no luck.

I do see this error in the log
DEBUG 2024-10-24T11:50:11 - Running hourly callbacks
ERROR 2024-10-24T11:50:11 - Error in scheduled task func='locked_user_reset': exception='AllRepositories.init() got an unexpected keyword argument 'user_id''

I think these issues are somehow related to so networking issues.
I am able to send test emails to my gmail account without any issues.

Love the program otherwise any direction would be appreciated. Cheers.

@michael-genson
Copy link
Collaborator

Can you wrap your yaml in triple backticks? It makes it easier to read.

```yaml
YOUR-YAML-HERE
```

How exactly are you deploying via Synology? There are a few different ways of using docker compose (using projects, via SSH, etc.).

Regarding OpenAI, you can remove the OPENAI_BASE_URL environment variable entirely, it will default to the correct endpoint. Also, make sure you actually supplied your API key in your real docker compose config (it's empty in the config you shared)

@michael-genson
Copy link
Collaborator

Error in scheduled task func='locked_user_reset'

Don't worry about that, that's a bug (which has been fixed in nightly) but it won't impact anything you're seeing here.

@starlord998
Copy link
Author

Can you wrap your yaml in triple backticks? It makes it easier to read.


```yaml

YOUR-YAML-HERE

```

How exactly are you deploying via Synology? There are a few different ways of using docker compose (using projects, via SSH, etc.).

Regarding OpenAI, you can remove the OPENAI_BASE_URL environment variable entirely, it will default to the correct endpoint. Also, make sure you actually supplied your API key in your real docker compose config (it's empty in the config you shared)

I am deploying via portainer by creating a stack.
Regarding the openAI, I will remove the base URL. I do have my API in my actual docker compose.

@michael-genson
Copy link
Collaborator

Can you edit your post to surround your yaml in triple backticks?

@starlord998
Copy link
Author

starlord998 commented Oct 25, 2024

version: "3.8"

services:
  mealie:
    image: ghcr.io/mealie-recipes/mealie:latest
    container_name: mealie
    restart: always
    ports:
      - "9925:9000" #
    deploy:
      resources:
        limits:
          memory: 1000M #
    volumes:
      - /volume1/docker/mealie/mealie-data:/app/data/
    environment:
      # Set Backend ENV Variables Here
      ALLOW_SIGNUP: "true"
      PUID: 1030
      PGID: 100
      TZ: America/Chicago
      MAX_WORKERS: 1
      WEB_CONCURRENCY: 1
      BASE_URL: https://mealie.xxx.me
      API_PORT: 9000
      LOG_LEVEL: debug
      # GMAIL
      SMTP_HOST: smtp.gmail.com
      SMTP_PORT: 587
      SMTP_FROM_NAME: [email protected]
      SMTP_AUTH_STRATEGY: TLS
      SMTP_FROM_EMAIL: [email protected]
      SMTP_USER: [email protected]
      SMTP_PASSWORD:
      # OPENAI
      OPENAI_BASE_URL: https://api.openai.com/v1
      OPENAI_MODEL: gpt-4
      OPENAI_WORKERS: 2
      OPENAI_CUSTOM_HEADERS:
      OPENAI_CUSTOM_PARAMS:
      OPENAI_REQUEST_TIMEOUT: 90
      OPENAI_SEND_DATABASE_DATA: "true"
      OPENAI_ENABLE_IMAGE_SERVICES: "True"
      OPENAI_API_KEY:
      # Database Settings
      DB_ENGINE: postgres
      POSTGRES_USER: mealie
      POSTGRES_PASSWORD: mealie
      POSTGRES_SERVER: postgres
      POSTGRES_PORT: 5432
      POSTGRES_DB: mealie
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    container_name: postgres
    image: postgres:15
    restart: always
    volumes:
      - /volume1/docker/mealie/mealie-pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: mealie
      POSTGRES_USER: mealie
      PGUSER: mealie
    healthcheck:
      test: ["CMD", "pg_isready"]
      interval: 60s
      timeout: 60s
      retries: 3

volumes:
  mealie-data:
  mealie-pgdata:

My apologies. The copy and paste had stripped the formatting the first time.

@michael-genson
Copy link
Collaborator

Oh I see what's wrong, kind of. In your initial comment:

logs INFO 2024-10-24T12:08:38 - [104.28.104.25:0] 405 Method Not Allowed "POST /api/recipes/create-url HTTP/1.1"

Did you recently update Mealie? Looks like you're using an old version of the frontend (which normally doesn't happen). Try clearing your cache on the device you're trying to create recipes from. If not, try from another device/browser and see if you get the same error in your logs.

@starlord998
Copy link
Author

starlord998 commented Oct 25, 2024

I cleared the cache, stopped the container, deleted all the old images and redeployed the container. Everything seems to load but I get the same errors in site settings "your current version (null) does not match the latest release..."
The "General About" does not load.
Same issue when trying to load a URL to import a recipe.
Same issue from different browsers, even on different machines.

@michael-genson
Copy link
Collaborator

michael-genson commented Oct 25, 2024

In that case something's definitely wrong with the deployment. Since I'm not familiar with Portainer I can't really help you there, but everything seems right with your Mealie configuration.

Potentially your Mealie image isn't correct, so maybe you've got it stored somewhere else in Portainer? I'm not sure, but the image you're using (ghcr.io/mealie-recipes/mealie:latest) in your config is correct. You can also try switching to a pinned version (i.e. ghcr.io/mealie-recipes/mealie:v2.0.0)

@starlord998
Copy link
Author

In that case something's definitely wrong with the deployment. Since I'm not familiar with Portainer I can't really help you there, but everything seems right with your Mealie configuration.

Potentially your Mealie image isn't correct, so maybe you've got it stored somewhere else in Portainer? I'm not sure, but the image you're using (ghcr.io/mealie-recipes/mealie:latest) in your config is correct. You can also try switching to a pinned version (i.e. ghcr.io/mealie-recipes/mealie:v2.0.0)

I stopped the containers, deleted them, deleted the stored images, deleted the mapped directories and reran the docker-compose with the :v2.0.0 tag. The containers restart and are noted healthy I portainer but still getting the "null" version on the about page that does not load and the URLs that cannot be imported.

@boc-the-git
Copy link
Collaborator

Can you do a docker compose down (which will delete the container, as I believe you know), then run docker compose up -d && docker compose logs -f and copy and paste all the logs here, up until the time that they stop generating lots of stuff (e.g. the first 30s or so of logs is the start up stuff).

There might be some things in there you need to redact.

I'd also be keen as a next test for you to stop using volumes on your filesystem and instead use docker volumes, and see if that makes a difference.

You've modified the PGID and PUID env vars from their defaults, do you understand the exact impact of that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants