Giter VIP home page Giter VIP logo

recipesage-selfhost's Introduction

RecipeSage Self-Hosting Toolkit


RecipeSage is a free personal recipe keeper, meal planner, and shopping list organizer for Web, IOS, and Android. It can be used to share recipes, shopping lists, and meal plans with your family & friends, as well as import (grab) recipes from any URL on the web.

This repository contains the configuration needed to run your own, personal instance of RecipeSage.

The docker images used here are based on the same version that the official RecipeSage uses in the cloud for the hosted instance. I'm mostly focused on the official hosted instance, but please let me know if there are issues when attempting to run it locally!

License/Usage Restrictions

Please note that this repository and all public RecipeSage branding, docker images, code, binaries, and everything else are for personal, private (non-public), non commercial use only. All RecipeSage branding is not licensed for reuse.

Warning: There are portions of the software that may not work. I don't warranty the functionality here. You're in charge of making backups and making sure you don't lose data, especially when updating!

Setup

For Synology boxes, see this setup guide instead.

  1. You'll need Docker to run RecipeSage locally. Although you can attempt to run it without Docker, you're on your own.
  2. Start all containers with docker compose up -d
  3. The app should be available at port 7270. You can change that by changing this to something else, such as 3000:80 for port 3000.

You'll very likely want to put RecipeSage behind a reverse proxy for SSL termination (and so that you can run more than just RecipeSage!). That's not covered by this README, but I encourage you look at Caddy or Nginx Proxy Manager if you are unfamiliar with reverse proxies. A reverse proxy isn't strictly necessary to use RecipeSage self-hosted, however.

Updating

By default, the database will be automatically migrated when updating to a new container version. As with any migration/upgrade, I strongly recommend taking a backup of your volumes before migrating to avoid any potential data loss. My first recommendation when encountering issues after an update will be to rollback, which will be impossible if you don't have a backup.

  1. Take a look at the changelog below for any special upgrade notes. Then follow the steps below.

  2. Update your local copy of this repo with the latest from this repository. If cloned with Git, this is as simple as git pull.

  3. Update your local images: docker compose pull.

  4. Down & up the containers: docker compose down --remove-orphans && docker compose up -d


Customization

The following sections provide some information on customizing your instance. Following the "setup" section is enough to get you running with a RecipeSage instance like that of the official site.

Disabling Registration

If you want to disable registration, after you have registered yourself as a user, add this to the top of the docker environment variables: DISABLE_REGISTRATION=true

Then, down & up the containers: docker compose down && docker compose up -d

When registration is disabled, the registration screen will still appear but will fail with an error if anyone tries to register.

Bonus Features

The "bonus features" from the hosted version can be activated by running the following command (swap out the email address with your account email). Please contribute to the development & maintenance of RecipeSage at https://recipesage.com/#/contribute -- Julian.

./activate.sh [email protected]

OpenAI API Keys

This section is optional, but does enable some features

Some of the features within the app rely on an OpenAI API key and will not be functional by default. This includes the "scan from image", "scan from PDF", and "autofill from text" features.

I cannot provide support for setting up an OpenAI account.

  1. Create an API key with OpenAI at https://platform.openai.com and setup your credit card with them
  2. Set OPENAI_API_KEY in your docker-compose to the API key you created (it's already in there, just with no value)
  3. Re-create the containers via docker-compose if you've already started them

FAQ

I'm seeing an "unexpected error occurred" error when trying to register

This is most frequently because the migration script has not been run successfully. Please include logs from the API container when posting any issue related to this.

Container Structure

This section is here just to explain the purpose of each container and why it's necessary. Following Docker principles, every part of the application is compartmentalized into it's own container with it's own singular responsibility. I've described what role each plays in making the application do what it does.

The proxy container facilitates divvying up requests between the api, the static (frontend, and the minio container. Without it, you'd need to route requests yourself, such as properly directing requests that head to /api/* to the api container, and requests that go to any other path on /* to the static container.

The static container is a very simple image with the prebuilt frontend assets for that version of RecipeSage. The application cannot run without it.

The api container facilitates all data storage for the application. The application cannot run without it.

The elasticsearch container facilitates the hyper-accurate fuzzysearch for the app. Without it, search within the app will not work.

The pushpin container is a broker for all websocket connections. Without it, all realtime interactions between multiple users won't work and will require a reload to get new content, such as when a shopping list item is checked off.

The postgres container is the database. The application cannot run without it.

The browserless container is a virtual web browser that is used to scrape recipe data when you paste a URL into the "autofill" feature of the app. Without it the recipe scraper should still work, but will fall back to JSDOM which will be significantly less accurate and may contain formatting errors.

The ingredient-instruction-classifier container facilitates machine learning classification of ingredients and instructions, which is used to improve accuracy during the "autofill" feature. Without it the recipe scraper will still work, but will lose the ability to pull ingredients or instructions from webpates with no JSON-LD headers and no formatting.

Changelog

v4.0.0

Migrations are now automated, and use a different migration tool.

If you have an older version of this repository, you must upgrade to this version of the repository and do the following before upgrading to newer versions so that migrations all line up:

  1. Update your local copy of the repository to v4.0.0
  2. Run docker compose exec api tsx packages/backend/src/migrate
  3. If the command prior ran successfully, run docker compose exec api npx prisma migrate resolve --applied 0_init
  4. Restart the API container with docker compose restart api

v3.1.0

docker-compose has been officially deprecated, so the app has migrated to using docker compose.

Full ARM64 support is now official. All containters have associated ARM64 platform builds.

v3.0.0

ElasticSearch has been removed in favor of TypeSense. You can remove any old ElasticSearch related containers or volumes if you choose (though the application still remains fully compatible with ElasticSearch, should you keep SEARCH_PROVIDER as elasticsearch as well as ElasticSearch related environment variables the same).

No data will be lost if you choose to switch to TypeSense. TypeSense will be populated on your first login to the app after upgrading. TypeSense is faster for RecipeSage purposes, as well as less memory-intensive.

v2.0.0

Revamp selfhosting configs. Use local filesystem rather than minio.

Important upgrade notes: (none of this applies to new users, only those with existing data)

The new docker compose.yml no longer uses minio, and instead writes directly to the local filesystem. You'll need to keep your minio instance from the old Dockerfile along with it's volume definition.

v1.2.0

Update RecipeSage image to v2.9.0, ElasticSearch image to v8.4.3, and Browserless to 1.53.0.

Upgrade note: You must first upgrade your elasticsearch container image to v7.17 before upgrading to this new version.

v1.1.1

Fix public access permissions for new minio installations.

v1.1.0

Move minio behind app proxy.

Note: If you're upgrading from an earlier version of these selfhost configs, you'll need to make sure to continue to expose 9000 on the Minio container in order to maintain access to images uploaded before this change, or update the image path in the DB.

v1.0.0

Initial release.

recipesage-selfhost's People

Contributors

evs91 avatar julianpoy avatar mathieumoalic avatar sskousen avatar uriel1998 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

recipesage-selfhost's Issues

Backup automation question

Is there a way to automate backing up the database? I would like to automate something with a cronjob, but it seems the only way is manual. This is more of a question as opposed to a feature request. If it doesn't exist, I will manually do it every so often.

Question: Installing RecipeSage on Raspberry Pi

I'm trying to install RecipeSage on a Raspberry Pi 4 and the primary issue I run into while install is that there is no matching manifest for linux/arm/v7 for minio. Could you please point me to a minio image that would work for raspberry pi, I tried a few without any success.

I have an AWS S3 account, so can I completely bypass the minio parts of the installation?

Thanks a lot for your work!

Unable to export recipes

Hello, I just got everything running and it works great except for exports. I'm running the default docker-compose.yml except I changed the port number. I accessed the GUI by going directly to the server IP:Port, no external access setup yet. Whenever I click on any of the export options, I get something along the lines of this:

Error: ENOENT: no such file or directory, open '/api/images/filesystem/recipeImage/2023/6/1686538455277-42017a6af810c7'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:35)
at getRecipeDataForExport (/app/packages/backend/src/routes/data.js:97:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at (/app/packages/backend/src/routes/data.js:194:23)

Maybe a permissions issue on my end?

Unable to create an account

Following are my VM specs:
OS: Linux (Ubuntu 22.04)
Size: Standard D2s V3 (2 vcpus, 8 GiB memory) on Azure

Installed Docker by following: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04

Installed Docker Compose by following: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04

I forked the repository today and ran the following:

git clone https://github.com/sandy9999/RecipeSage-selfhost
cd RecipeSage-selfhost
docker compose up

image

Observed the above. When I try to create an account on the self hosted version, I get "An unexpected error occurred. Please try again. If the problem continues to occur, please contact me."

Any ideas on how I can debug this?

Unable to register due to `recipesage_api_1` container error

Hi,

I'm trying to set up a self-hosted instance of RecipeSage, but I'm encountering an error when I try to register. The recipesage_api_1 container logs show this message:

POST /users/register?false=false& 500 199.842 ms - 1097
Error
    at Query.run (/app/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)
    at <anonymous> (/app/node_modules/sequelize/lib/sequelize.js:315:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PostgresQueryInterface.select (/app/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)
    at Function.findAll (/app/node_modules/sequelize/lib/model.js:1140:21)
    at Function.findOne (/app/node_modules/sequelize/lib/model.js:1240:12)
    at <anonymous> (/app/packages/backend/src/routes/users.js:558:20)
    at <anonymous> (/app/node_modules/sequelize/lib/sequelize.js:507:18)
    at <anonymous> (/app/packages/backend/src/routes/users.js:545:19)
    at <anonymous> (/app/packages/backend/src/utils/wrapRequestWithErrorHandler.js:4:7)

I did not set the DISABLE_REGISTRATION env variable at all, and setting it to false dosen't help.

I have followed the instructions for running the migrations and have also tried to restart the containers. However, none of these steps solved the issue.

The other containers seem to be running fine, except for recipesage_elasticsearch_1, which I had to lower RAM requirements in docker-compose.yml by editing JVM arguments, but now it's running fine and is no longer bootlooping.

I also have an akward behaviour with recipesage_api_1 that bootloops like 3 times or so when I docker-compose up -d with the following error:

Node.js v18.16.0
Error while initializing firebase for notifications
/app/node_modules/@elastic/transport/lib/Transport.js:528
                            : new errors_1.ConnectionError(error.message, result);
                              ^


ConnectionError: connect ECONNREFUSED 172.21.0.3:9200
    at SniffingTransport.request (/app/node_modules/@elastic/transport/lib/Transport.js:528:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Client.PingApi (/app/node_modules/@elastic/elasticsearch/lib/api/api/ping.js:37:12)
    at init (/app/packages/backend/src/services/search/elasticsearch.ts:17:3) {
  meta: {
    body: undefined,
    statusCode: 0,
    headers: {},
    meta: {
      context: null,
      request: {
        params: {
          method: 'HEAD',
          path: '/',
          querystring: '',
          headers: {
            'user-agent': 'elastic-transport-js/8.3.1 (linux 5.15.0-78-generic-x64; Node.js v18.16.0)',
            'x-elastic-client-meta': 'es=8.4.0,js=18.16.0,t=8.3.1,hc=18.16.0',
            accept: 'application/vnd.elasticsearch+json; compatible-with=8,text/plain'
          }
        },
        options: {},
        id: 1
      },
      name: 'elasticsearch-js',
      connection: Connection {
        url: <ref *1> URL {
          [Symbol(context)]: URLContext {
            href: 'http://elastic:recipesage_selfhost@elasticsearch:9200/',
            origin: 'http://elasticsearch:9200',
            protocol: 'http:',
            hostname: 'elasticsearch',
            pathname: '/',
            search: '',
            username: 'elastic',
            password: 'recipesage_selfhost',
            port: '9200',
            hash: ''
          },
          [Symbol(query)]: URLSearchParams {
            [Symbol(query)]: [],
            [Symbol(context)]: [Circular *1]
          }
        },
        tls: null,
        id: 'http://elasticsearch:9200/',
        timeout: 30000,
        headers: { authorization: 'Basic ZWxhc3RpYzpyZWNpcGVzYWdlX3NlbGZob3N0' },
        deadCount: 0,
        resurrectTimeout: 0,
        _openRequests: 0,
        weight: 1000,
        pool: <ref *2> Pool {
          _events: [Object: null prototype] {},
          _eventsCount: 0,
          _maxListeners: undefined,
          [Symbol(kCapture)]: false,
          [Symbol(destroyed)]: false,
          [Symbol(onDestroyed)]: [],
          [Symbol(closed)]: false,
          [Symbol(onClosed)]: [],
          [Symbol(queue)]: FixedQueue {
            tail: [FixedCircularBuffer],
            head: [FixedCircularBuffer]
          },
          [Symbol(clients)]: [ [Client], [Client] ],
          [Symbol(queued)]: 0,
          [Symbol(onDrain)]: [Function: onDrain],
          [Symbol(onConnect)]: [Function (anonymous)],
          [Symbol(onDisconnect)]: [Function (anonymous)],
          [Symbol(onConnectionError)]: [Function (anonymous)],
          [Symbol(stats)]: PoolStats { [Symbol(pool)]: [Circular *2] },
          [Symbol(dispatch interceptors)]: [],
          [Symbol(connections)]: 256,
          [Symbol(url)]: URL {
            [Symbol(context)]: [URLContext],
            [Symbol(query)]: [URLSearchParams]
          },
          [Symbol(options)]: {
            keepAliveTimeout: 600000,
            keepAliveMaxTimeout: 600000,
            keepAliveTimeoutThreshold: 1000,
            pipelining: 1,
            maxHeaderSize: 16384,
            headersTimeout: 30000,
            bodyTimeout: 30000,
            connect: [Function: connect],
            interceptors: undefined
          },
          [Symbol(factory)]: [Function: defaultFactory],
          [Symbol(Intercepted Dispatch)]: [Function: [dispatch]],
          [Symbol(needDrain)]: false
        },
        [Symbol(status)]: 'alive',
        [Symbol(ca fingerprint)]: null,
        [Symbol(diagnostics)]: Diagnostic {
          _events: [Object: null prototype] {},
          _eventsCount: 0,
          _maxListeners: undefined,
          [Symbol(kCapture)]: false
        },
        [Symbol(event emitter)]: EventEmitter {
          _events: [Object: null prototype] {},
          _eventsCount: 0,
          _maxListeners: undefined,
          [Symbol(kCapture)]: false
        }
      },
      attempts: 3,
      aborted: false
    },
    warnings: [Getter]
  }
}

I don't think this is related, but we never know.

Importing problems

Hello!

Thanks again for providing us with a way for selfhosting, it is extremely appreciated!

I did find a issue importing from Paprika files (log below). You have, of course, no obligation whatsoever to fix this, but if you're ever bored and want to take a look, it would be awesome!

`
GET /users/friends?token=c2740d403df31b117dc87a38f46c38fce530d691e0cce701ec0e195c37fa26dd9963e6b65fff9ac8eed8b47fdf1ec1d6 200 178.418 ms - 58

GET /users/capabilities?token=c2740d403df31b117dc87a38f46c38fce530d691e0cce701ec0e195c37fa26dd9963e6b65fff9ac8eed8b47fdf1ec1d6 304 11.846 ms - -

/tmp/paprika-import/5eb2826877beff3896828c96e5ede048

(node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

logged

POST /import/paprika?token=c2740d403df31b117dc87a38f46c38fce530d691e0cce701ec0e195c37fa26dd9963e6b65fff9ac8eed8b47fdf1ec1d6 500 1448.362 ms - 216

GET /labels/?token=c2740d403df31b117dc87a38f46c38fce530d691e0cce701ec0e195c37fa26dd9963e6b65fff9ac8eed8b47fdf1ec1d6 304 39.882 ms - -`

docker-compose exec api /app/migrate error, also minio won't stay running

❯ sudo docker-compose exec api /app/migrate
(node:35) UnhandledPromiseRejectionWarning: SequelizeHostNotFoundError: getaddrinfo ENOTFOUND postgres
    at /snapshot/app/Backend/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:173:24
    at Connection.connectingErrorHandler (/snapshot/app/Backend/node_modules/pg/lib/client.js:194:14)
    at Connection.emit (events.js:315:20)
    at Socket.reportStreamError (/snapshot/app/Backend/node_modules/pg/lib/connection.js:71:10)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:35) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:35) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Also minio won't stay running:

Added `myminio` successfully.
Bucket created successfully `myminio/recipesage-selfhost`.
Access permission for `myminio/recipesage-selfhost` is set to `public`
Added `myminio` successfully.
mc: <ERROR> Unable to make bucket `myminio/recipesage-selfhost`. Your previous request to create the named bucket succeeded and you already own it.
Access permission for `myminio/recipesage-selfhost` is set to `public`
Added `myminio` successfully.
mc: <ERROR> Unable to make bucket `myminio/recipesage-selfhost`. Your previous request to create the named bucket succeeded and you already own it.
Access permission for `myminio/recipesage-selfhost` is set to `public`

Trouble deploying on Qnap NAS

I have been trying to deploy on a Qnap NAS for several days and I don't know what to look at next. I use portainer to deploy and maintain containers with no problems accessing other containers, so I don't think it's a firewall or interconnectivity problem.

Because this deployment is on a NAS I had to change the port from 80. I did this on docker-compose.yml line 8 to '- 18011:80' and in proxy.conf line 5 to 'listen 18011;'
I also had to declare the absolute path to the proxy.conf file on line 6. Aside from credentials I've made no other changes.

After deploying with all the containers up and running (except for create minio buckets), and running /app/migrate on the API, when I try to access recipe-sage I get 'ERR_CONNECTION_REFUSED' but no access attempt in the nginx container logs.

I've tried removing all the containers, images, and networks and redeploying but still the same behavior. I've also tried pulling up a local browser on the NAS and accessing from localhost:18011 with the same results.

I have other containers on this NAS, but this is my first experience with nginx, so I don't know if there's other changes I need to make to proxy.conf to get the proxy manager to look at the NAS ip address.

I can post logs or files if that'll help, just not sure where to look next

Meals move but display doesn't update; two feature requests

I've been running RecipeSage self-hosted for about three months now and it's amazing. Thank you!

I have one bug report and two feature requests. Obviously, this is a project offered in good will, so I'm not expecting you to implement them, but if you ever decide to expand the feature set in the future, these would be cool:

  • Preferences persisting across sessions. Right now, when I log out or open RecipeSage in a new browser, using the same account, I have to set all the preferences from scratch each time. For example, changing the meal planner to start on Sundays rather than Mondays, turning off the display of descriptions on the My Recipes page, turning on the sidebar navigation, etc.
  • Implement CalDAV support for the Meal Plans calendar so that meals can be synchronized to a CalDAV client.

For the bug report: Sometimes, maybe about 20% of the time, when I click and drag an existing meal on the calendar to a new date, the display does not update and the meal stays where it is. However, if I refresh the page, the meal will be on the date to which I moved it. I am using Firefox 96.0.3 on macOS.

Please let me know if you need any further details. Thanks again!

Podman support

Woud it be possible to add support for Podman pods?

Currently I think three containers are using port 3000 and two port 80, which will not work in a single pod.

Photos Not Appearing

Same issue as #29 - I'm running what appears to be the latest version (2.9.9) on a linux host but the recipe photos don't appear. Everything else seems to work great.

I * think * a relevant log output is:

2023-01-04T01:20:16.571167295Z 2023/01/04 01:20:16 [warn] 28#28: *208 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000004, client: 192.168.1.2, server: localhost, request: "POST /api/images?token=1a5a7e4d812a3709e2be5b5e5789a35d2565f274feb97824f9f113b27678a0401ebb6683c02a9b37e50371551e29fca8& HTTP/1.1", host: "192.168.1.2:46789", referrer: "http://192.168.1.2:46789/" 2023-01-04T01:20:16.738510986Z 192.168.1.2 - - [04/Jan/2023:01:20:16 +0000] "POST /api/images?token=1a5a7e4d812a3709e2be5b5e5789a35d2565f274feb97824f9f113b27678a0401ebb6683c02a9b37e50371551e29fca8& HTTP/1.1" 200 456 "http://192.168.1.2:46789/" "Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0" "-" 2023-01-04T01:20:16.842654900Z 192.168.1.2 - - [04/Jan/2023:01:20:16 +0000] "GET /minio/recipesage-selfhost/1672795216621 HTTP/1.1" 403 327 "http://192.168.1.2:46789/" "Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0" "-"

ingredient-instruction-classifier failing with core dumped error

Hi!

I'm running this with a basically-stock configuration copied from your docker-compose example here.
The site runs okay, however the ingredient-instruction-classifier image is in a restart loop with the following error:

ingredient-instruction-classifier_1 | Illegal instruction (core dumped)

Unable to create account from welcome page

Fresh install today of the self hosted docker image. When I try to create my account, I get the following error:

An unexpected error occured. Please try again.

Is there a log file which I can look at or provide for troubleshooting?

S3 setup several issues

Hello,

I am trying to setup the project pointing to my own S3 bucket. I've already setup the right environment variables, and removed the miso variables that are not needed. However I am getting all sort of errors when trying to upload an image:

  1. After creating a "vanilla" S3 bucket and pointing to it. I make triple sure that the AWS credentials I have have "AmazonS3FullAccess" policy and that I can write and read objects using the access-key/secret-key outside of RecipeSage.
  2. When plugging these credentials to RecipeSage I get the the error: Sharp Error: AccessControlListNotSupported: The bucket does not allow ACLs. So, my first question: Why do we need ACLs??? if we are making a request through the backend ...
  3. In any case, I enable ACLs in the S3 bucket, and after doing so, I get the following error: recipesage-selfhost-api-1 | Sharp Error: AccessDenied: Access Denied

What am I missing for the configuration?

(btw I did this instead of using minio because when using I was getting an error saying that it could not find the bucket when uploading an image 🤷‍♂️. , but that's a different issue.

Self-host error on login ~ error on command docker-compose exec api /app/migrate

Hello,

I successfully self-hosted RecipeSage a while back and wanted to get back into it. After docker-compose pull I am receiving an error when trying to log in:

image
I realized I had not ran migrations, however when I try the command docker-compose exec api /app/migrate I get either of these two errors (the IP in the 2nd error varies) :
image

Problems with Importing from JSON-LD file

Hi there,

I had a backup of my recipe data and after setting up RecipeSage on a new instance of mine, I tried to import from my backup JSON-LD file.

Images are lost. I understand this is because I uploaded images, and they are not stored as base64 but as URLs, which is reasonable. So I examined the backup volumes option.

The backup volumes that I have are:
a) elasticsearchdata.tgz
b) miniodata.tgz
c) postgresdata.tgz

The volumes that I see with the latest code and latest instance are:
a) recipesage-selfhost_apimedia
b) recipesage-selfhost_elasticsearchdata
c) recipesage-selfhost_postgresdata

I see that minio is not used anymore and that the new docker-compose.yml writes directly to file system. However, I am wondering if I can retrieve my recipe data along with the images from the backup volumes (the ones above ending with .tgz) that I have.

Thanks for your time and help!

Installing on Ubuntu

Hello,

I am attempting to install this on an Ubuntu VM I created with my Proxmox cluster at my house.

I've installed Docker & Docker Compose and have removed everything in docker-compose.yaml file relating to minio. Everything seems to install fine, but there appears to be an issue with ingredient-instruction-classifier. The container is in a constant "restarting mode".

When I look at the logs, here is what I am seeing:

ingredient-instruction-classifier_1 | Illegal instruction (core dumped)
recipe-sage_ingredient-instruction-classifier_1 exited with code 132
ingredient-instruction-classifier_1 | Illegal instruction (core dumped)
recipe-sage_ingredient-instruction-classifier_1 exited with code 132

Any suggestions on how to fix this?

Also, I cannot save recipes or add images and not sure what the issue is. Looking at logs, I'm getting a 415 Unsupported Media Type when trying to upload any images. And i've tried uploading jpg and png images with the same error.

Thank You,
Mike

Photos do not appear

First time user here. I'm up and running on a Windows host in WSL mode with the provided docker-compose file verbatim (except for host port number) but none of the photos are showing, including recipes and profile photos. For your review, below are some log entries recorded by Docker when I tried adding a photo to my user profile, which ultimately results in showing the standard "broken" image in the browser.

docker log entries recipesage-proxy-1 | 2022/10/03 03:33:25 [warn] 33#33: *184 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000002, client: 172.19.0.1, server: localhost, request: "POST /api/images/?token=1deb137e2a85b0d811ef9ec9feb47589de14ca74ea9c6322a7f10a8ecb320058dcf72163daeab7ef748dd5481b018581 HTTP/1.1", host: "localhost:8900", referrer: "http://localhost:8900/"

recipesage-api-1 | POST /images/?token=1deb137e2a85b0d811ef9ec9feb47589de14ca74ea9c6322a7f10a8ecb320058dcf72163daeab7ef748dd5481b018581 200 55.547 ms - 474

recipesage-proxy-1 | 172.19.0.1 - - [03/Oct/2022:03:33:25 +0000] "POST /api/images/?token=1deb137e2a85b0d811ef9ec9feb47589de14ca74ea9c6322a7f10a8ecb320058dcf72163daeab7ef748dd5481b018581 HTTP/1.1" 200 474 "http://localhost:8900/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" "-"

recipesage-proxy-1 | 172.19.0.1 - - [03/Oct/2022:03:33:25 +0000] "GET /minio/recipesage-selfhost/1664768005749 HTTP/1.1" 403 327 "http://localhost:8900/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" "-"

When I point my browser at the broken image, namely http://localhost:8900/minio/recipesage-selfhost/1664767774266, I get the below:

browser error Error

Code: AccessDenied
Message: Access Denied.
Key: 1664767774266
BucketName: recipesage-selfhost
Resource: /recipesage-selfhost/1664767774266
RequestId: 171A7179FDF7E33C
HostId: 0d53d13a-4f5e-4bbf-a1b9-31de194f73fd

Looking in the "miniodata" volume, I see the "/recipesage-selfhost/1664767774266" bucket folder. The only file in there is a 9 KB xl.meta file with no sign of the photo I uploaded.

Please advise on what may be wrong with my setup, thanks much.

Different results between official and selfhosted version when importing recipes from URL

Hi Julian

Firstly thanks for a great service!

I've just deployed the selfhosted version of RecipeSage after playing about with the official hosted version for a couple of days.
All in all it went very smooth, however i'm seeing different results when importing recipes between the two versions.

One recipe, which imports without any hickups in the official version, doesn't populate any fields but the source URL in the selfhosted version. Example (in danish)

Even recipes that do import in the selfhosted version are processed way better in the official version (requiring less cleanup)
Example (in danish)

I tried poking around the docker container logs with no, to me, clear culprit.

I'm really digging RecipeSage, the import tool is very powerful, just a shame it's not performing as well on the selfhosted edition for me.

People Page / Sharing between family members

Hello,
First of all, thanks a lot for this amazing work !
As some others, I prefer a lot to self host the services that I use, so I don't use your public version. I use version 2.7.2 beta 3 with a self host S3 on another VM
I would love to have the same possibility to have the People Page and to be able to share all the recipes between family members.
Is there something I can activate to have it ?

Thanks in advance !

Unable to upload image

When trying to upload an image for a recipe the process fails. At the same time something related with not finding a bucket pop-up on docker logs, so it is probably related.

Also I'm not sure if it is supposed to grab an image when trying to autofill from URL. That would be great, although I guess somewhat complicated.

MinIO, PostgreSQL, and Elasticsearch errors after upgrading to v1.20

Howdy!

I ran into some problems upgrading from RecipeSage 2.8.1 to 2.9.0 (included in the 1.20 release of this self-hosted repo)… basically, everything blew up. I pulled down the new docker-compose.yml file and ran it; everything built successfully, but there seems to be a problem with using the latest versions of MinIO, PostgreSQL, and Elasticsearch. After the containers were built, RecipeSage's static pages would load, but I couldn't log in. The MinIO and PostgreSQL containers kept bouncing, and the Elasticsearch container was using something like 80% CPU and north of 9 GB of RAM on launch before it, too, started bouncing. (This is on a Synology NAS device with an Intel Atom processor and 18 GB of RAM.)

The MinIO container was reporting:

ERROR Unable to use the drive /data: Drive /data: found backend type fs, expected xl or xl-single

The PostgreSQL container was reporting:

The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 15.1 (Debian 15.1-1.pgdg110+1). FATAL:  database files are incompatible with server

The Elasticsearch container was reporting:

fatal exception while booting Elasticsearch
cannot upgrade a node from version [7.6.1] directly to version [8.4.3], upgrade to version [7.17.0] first.

It looks like MinIO has discontinued their filesystem mode as of February 2022, so some kind of local conversion process to Single-Node Single-Drive mode might be necessary for those running MinIO, as I am.

Admittedly, aside from the functional deprecation in MinIO, it's probable that these issues wouldn't have cropped up if I had been rebuilding my RecipeSage container regularly and keeping up with the latest dependencies but, alas, it had been up for quite a while and so jumping straight to the latest versions of PostgreSQL and Elasticsearch was no bueno.

I was able to blow away my RecipeSage data mounts, restore from backups, and change the docker-compose.yml file to use older versions of MinIO (minio/minio:RELEASE.2022-10-24T18-35-07Z) and PostgreSQL (postgres:14.6) and this has solved the problem; I am back on RecipeSage 2.8.1 and things appear to be working as expected, again. For those who don't want to wrangle with MinIO, staying at RELEASE.2022-10-24T18-35-07Z appears to be the only solution.

Just thought I'd let you know about the MinIO problem! As always, thanks for the great program.

Scrolling Issue on Android Chrome & IOS Safari

Hi Julian,

I have been testing more of the selfhosted version of the app and have noticed something odd when viewing the PWA on mobile.

When using the selfhosted version on desktop it seems all browsers work as expected and when scrolling through the list of recipes the scrolling works well.

On mobile both Android and IOS scrolling seems inconsistent. On Android the scrolling is useable but it seems to jump around when scrolling and sometimes when scrolling to the bottom of the list the screen jumps back up the list.

On IOS the scrolling seems much worse. With a list over 10 recipes when scrolling down to the bottom it won't allow you to stay at the bottom of the recipe list.

Below is a link to the video on Android, if possible I will get a video on IOS as well so the issue is clearly seen.

https://nextcloud.steelyglint.duckdns.org/s/NcGtPmt68xPpQ5c

Any ideas on what might be causing this? The docker compose is pretty standard minus changing some passwords/keys to make it more secure. Also, I checked this on your official version and the issue does not persist when scrolling through a long recipe list on mobile.

Cannot start service proxy error

ERROR: for proxy Cannot start service proxy: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ubuntu/docker/recipesage/proxy.conf" to rootfs at "/etc/nginx/conf.d/default.conf": mount /home/ubuntu/docker/recipesage/proxy.conf:/etc/nginx/conf.d/default.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Hello everyone! I'm trying to get RecipeSage to run on my Raspberry Pi 4 (using Ubuntu 20.04) but docker-compose produces the error abovce. I tried running it on my laptop (Ubuntu 22.04) and the same error persists. I'll be more than happy to provide any additional info if needed.

recipesage_ingredient-instruction-classifier_1 container constantly restarting. Log says 'Illegal instruction (core dumped)'

Hi there.
Great piece of software.

Unfortunately, I think I'm seeing the exact same problem as: I have having the same issue as: #10
where the recipesage_ingredient-instruction-classifier container is constantly restarting with the log showing: Illegal instruction (core dumped)

I am running ubuntu server, rather than dedicated NAS software (unlike the setup reported by the other issue submitter).
I think the only niche thing I'm doing is hiding the forward facing part of recipe sage (which I guess is nginx) behind a reverse proxy, provided by caddy.
Is the reverse proxy causing the issue? Anything I can do to help diagnose this?

v2.11.0-beta8/9 fails to add an image by URL - 400 response from backend

Describe the bug
Tested on 2.11.0-beta8 and beta9. While editing a recipe and uploading an image using an image url, the frontend sends a POST json payload with the field imageUrl to the api endpoint /api/images. The backend still handles only multipart file object payload for this endpoint - expecting a field named image (see logs below), so it throws a 400 bad request and fails to upload image using the url (at least I didn't find an implementation in the backend src for handling imageUrl, please correct me if I'm wrong)

Another note, this bug was only seen in the self hosted version, using docker. The hosted version of RecipeSage doesn't have this issue when I tested on a free account.

I really like RecipeSage, is there a docker image version I can revert to in the meantime? I tested a few other beta versions, all had the same issue - had some trouble trying 2.10.0 given the switch from monio to filesystem change that happened.

This might just be a bug with the self hosted version if the hosted service works fine, but if the functionality is missing I'm also happy to open a PR!

What page/area is the bug in?
Recipe editor, image url dialog box

To Reproduce
Steps to reproduce the behavior:

  1. Run the docker-compose.yaml from the self hosted repo using version 2.11.0-beta8 (or 9) for the frontend and backend.
  2. Run the ./migrate.sh and ./activate.sh scripts
  3. Create account/login, click on fab add recipe button in bottom right. Save recipe after filling out fields.
  4. Click on edit recipe
  5. Click on options button in the top right
  6. Select "Add image by url"
  7. Enter an image link in the dialogue box, then click Confirm
  8. Verify error toast is shown, and 400 request is received in browser developer tools.

Expected behavior
Image should be downloaded and added to recipe using the provided url

Screenshots
Screenshots showing 400 response in browser developer tools + imageUrl being posted in the request payload

400 response from POST

Request body with imageUrl

Logs from backend showing bad request:

POST /images?token=*** 400 44.852 ms - 1060
Error: Must specify multipart field "image"
    at constructError (/app/packages/backend/src/utils/errors.js:2:13)
    at BadRequest (/app/packages/backend/src/utils/errors.js:8:33)
    at <anonymous> (/app/packages/backend/src/routes/images.js:28:13)
    at <anonymous> (/app/packages/backend/src/utils/wrapRequestWithErrorHandler.js:4:13)
    at Layer.handle (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:144:13)
    at multerMiddleware (/app/node_modules/multer/lib/make-middleware.js:13:41)
    at Layer.handle (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:144:13)
    at <anonymous> (/app/packages/backend/src/services/middleware.js:18:7)

Desktop (please complete the following information):

  • OS: Docker (hosted on ubuntu server)
  • Browser: Firefox, Chrome

Cannot Exporting. get error

Error: ENOENT: no such file or directory, open '/api/images/filesystem/recipeImage/2023/7/1688744018914-70c409e41ed8f9'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:35)
at getRecipeDataForExport (/app/packages/backend/src/routes/data.js:97:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at (/app/packages/backend/src/routes/data.js:142:23)

Can't reach Webservice / Nginx Proxy Error

Hi,
first of all, thank you for the great software!

I tried to get the whole thing to work on my server, but unfortunately I can't get it to work.

I have copied the Docker Compose file identically and started it. I get the following error:

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/recipesage/proxy.conf" to rootfs at "/etc/nginx/conf.d/default.conf": mount /root/recipesage/proxy.conf:/etc/nginx/conf.d/default.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

If I now check via "docker ps" which containers are running, I see that all of them are running except for the proxy.
This is probably where the problem that the web service cannot be reached comes from, but I cannot solve it.

CONTAINER ID   IMAGE                                                 COMMAND                  CREATED          STATUS          PORTS                     NAMES
37a38eebfe46   julianpoy/recipesage-selfhost:api-v2.9.4              "docker-entrypoint.s…"   25 seconds ago   Up 21 seconds   80/tcp                    recipesage-api-1
54c4575a8d99   postgres                                              "docker-entrypoint.s…"   25 seconds ago   Up 23 seconds   5432/tcp                  recipesage-postgres-1
31f748266285   browserless/chrome:1.53.0-chrome-stable               "./start.sh"             25 seconds ago   Up 22 seconds   3000/tcp                  recipesage-browserless-1
58c17be2fada   fanout/pushpin:1.27.0                                 "docker-entrypoint.s…"   25 seconds ago   Up 22 seconds   5560-5563/tcp, 7999/tcp   recipesage-pushpin-1
78ad0a847b32   julianpoy/recipesage-selfhost:static-v2.9.4           "/docker-entrypoint.…"   25 seconds ago   Up 22 seconds   80/tcp                    recipesage-static-1
e7603bcb64f7   minio/minio                                           "/usr/bin/docker-ent…"   25 seconds ago   Up 22 seconds   9000/tcp                  recipesage-minio-1
2dfd4a4cfdb2   julianpoy/ingredient-instruction-classifier:latest    "docker-entrypoint.s…"   25 seconds ago   Up 22 seconds                             recipesage-ingredient-instruction-classifier-1
7ffef02ad1d4   docker.elastic.co/elasticsearch/elasticsearch:8.4.3   "/bin/tini -- /usr/l…"   25 seconds ago   Up 22 seconds   9200/tcp, 9300/tcp        recipesage-elasticsearch-1

In the attachment I have my Docker Compose file (but didn't changed anything) and docker compose logs.
I am grateful for any ideas.

Greedings,
Nico
docker-compose.yml.txt
dockercomposelogs.txt

Running migrations fails; iCal link 404s; images in grid stretched

Howdy! I'm still loving RecipeSage and thanks, again, for developing it and making a self-hosted version. I finally got around to updating from 2.8.0 to 2.9.0 and I've noticed three issues since the upgrade:

  1. Running the migrations fails for me. When I run docker-compose exec api /app/migrate, I get the following error:
pkg/prelude/bootstrap.js:1930
      return wrapper.apply(this.exports, args);
                     ^

TypeError: object is not a constructor
    at Object.<anonymous> (/snapshot/app/Backend/src/migrate.js)
    at Module._compile (pkg/prelude/bootstrap.js:1930:22)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
    at node:internal/main/run_main_module:17:47
ERROR: 1

Things seem to work fine without this completing successfully but, since the documentation says to run migrations after each upgrade, this seems like a problem.

  1. The link provided to share my meal plans via .ics file 404s. I can reach the /api endpoint and receive the welcome message, but attempting to load the actual .ics file fails with this error:
Not Found
404

Error: Not Found
    at /snapshot/app/Backend/src/app.js
    at Layer.handle [as handle_request] (/snapshot/app/Backend/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/snapshot/app/Backend/node_modules/express/lib/router/index.js:328:13)
    at /snapshot/app/Backend/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/snapshot/app/Backend/node_modules/express/lib/router/index.js:346:12)
    at next (/snapshot/app/Backend/node_modules/express/lib/router/index.js:280:10)
    at /snapshot/app/Backend/node_modules/express/lib/router/index.js:646:15
    at next (/snapshot/app/Backend/node_modules/express/lib/router/index.js:265:14)
    at Function.handle (/snapshot/app/Backend/node_modules/express/lib/router/index.js:175:3)
    at router (/snapshot/app/Backend/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/snapshot/app/Backend/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/snapshot/app/Backend/node_modules/express/lib/router/index.js:328:13)
    at /snapshot/app/Backend/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/snapshot/app/Backend/node_modules/express/lib/router/index.js:346:12)
    at next (/snapshot/app/Backend/node_modules/express/lib/router/index.js:280:10)
    at cookieParser (/snapshot/app/Backend/node_modules/cookie-parser/index.js:46:14)

Related to this, the pop-up box that comes up when you click Share, that shows the URL for the .ics file, doesn't include the hostname of the system on which RecipeSage is running, so you can't actually just copy and paste that not-quite-address into your calendaring program. I'm not sure what facilities exist to glean the hostname of the host system in order to prefix the .ics file address (perhaps there isn't one?), but if there is, it would be more friendly to the user to include it.

  1. Finally, one minor nitpick… I'm fairly certain v2.8.0 was scaling down non-square images to fit the grid on the My Recipes page; now, it looks like v2.9.0 is maybe altering the aspect ratio of those images to fit the square grid. I have a rectangular photo of a tasty baked ham for my ham recipe, and before it looked great! Now, it looks squished lengthwise to fit in that square container. Not a big deal, just thought I'd mention that the previous scaling behavior seemed to work better for non-square images. Either that, or my memory is wrong, and the image looked squished all along!

Again, thanks!

Search returns odd results

I've tried this on my self hosted site and on the "official" site.

If you create an account, and import the attached recipes, then search for "pork", you get "Cheese Cocktail Crisps" and "Pink lemonade cake", along with some pork recipes. Happens with lots of other searched too...returns lots of results that don't contain the word.

Any thoughts on why?

Recipes to Import

RecipeSage in a subfolder

Hi,
Thanks for sharing this project, it looks great.

I am trying to configure my reverse proxy to be able to access RecipeSage from Internet, but I am having some issues because I use subfolders instead of subdomains.

I tried to change proxy.conf file, but it is not working. Is there some way to change the URL Base in RecipeSage, so I can access through https://mydomain.com/RecipeSage?

Thanks again!

Unable to sign in to my account after setting up local host

Hi,

I have self hosted recipesage with docker but every time i try to enter my credentials I get this error "An unexpected error occurred. Please try again. If the problem continues to occur, please contact me."

Can you please help me?

Thank you.

A few issues on Synology DSM

Howdy, Julian!

I am attempting to set up RecipeSage-selfhost on my Synology RS820+ running DSM 6.2.4-25556 Update 2.

I am using the api-latest and static-latest Docker images from the Registry. I have not made any modifications to the docker-compose.yml or proxy.conf files except to change the ports to 51433:80, since 80/tcp is in use on my system.

I can get docker-compose to run and complete successfully, but two of the containers it creates immediately go into a restart loop:

  • julianpoy/ingredient-instruction-classifier:latest restarts endlessly; based on your feedback in other threads, this container uses TensorFlow and depends on the AVX instruction set, and I can confirm that my RS820's Atom processor does not support it. So, no big deal, I can kill that container.

  • postgres also restarts endlessly; the logs show the following repeatedly:

PostgreSQL Database directory appears to contain a database; Skipping initialization

2021-10-21 05:01:49.375 UTC [1] FATAL:  database files are incompatible with server
2021-10-21 05:01:49.375 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0 (Debian 14.0-1.pgdg110+1).

If I edit the docker-compose.yml file to specify postgres:13 for the postgres Docker image, I can then get docker-compose to complete successfully with stable containers, minus the AVX-required one.

After that, I can see that 51433/tcp is open, and I can connect to it, but all I can get out of nginx is a 504 (time-out). I need to do more digging there before I ask for your help… just wanted to report the Postgres problem as a potential bug.

Thanks for making RecipeSage open source! I really appreciate your helping out the community.

Justin

Importing and Migrating self-hosted instance issues

I'm migrating recipe-sage to a new server, and I'm at the point to populate the new instance with all the recipes from the old instance. I had tried exporting to json-LD and importing, but I get a warning that the file doesn't end in json and an unexpected error ocurred when I try to import anyway. Both are running in Portainer. Is there a different method I can use to migrate?

Import a long txt file list of URLs (one per line)

Many thanks for RecipeSage, fantastic program and it's the only recipe manager I've tried that can parse recipes from The Guardian.

I have a list of recipes (300+) from that site in the form of a simple txt file with one URL per line, looks like this:

https://www.theguardian.com/lifeandstyle/2017/sep/09/apple-and-almond-tart-recipe-jeremy-lee-king-of-puddings
https://www.theguardian.com/lifeandstyle/2017/sep/01/chocolate-fridge-cake-recipe-jeremy-lee-king-of-puddings
https://www.theguardian.com/lifeandstyle/2017/sep/22/custard-tart-recipe-pastel-de-nata-jeremy-lee-quo-vadis-king-of-puddings

Is there a way to batch import them and I can't find it?

docker-compose exec api /app/migrate

Good day everyone. Please assist with what is probably my own stupidity. I am very new to docker and self hosting in general but i enjoy the experimentation. Would love to self host recipesage. This is a fresh install. When the install was done i ran the api /app/migrate command but get the following message now matter how long i wait:

Error response from daemon: Container 003fe6d7d2458041d59649fbc7a6550d8ac627c741f06c7809bc07ec7152ea07 is restarting, wait until the container is running

Then i get the "An unexpected Error occurred" while trying to create an account. Any help will be appreciated. I checked through the closed issues but none seems related.

Error loading shared library

Steps to reproduce:

  • clone repo
  • start docker compose
  • errors show up in the log
recipesage-selfhost-ingredient-instruction-classifier-1  | Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/node_modules/@tensorflow/tfjs-node/lib/napi-v8/../../deps/lib/libtensorflow.so.2)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module.load (node:internal/modules/cjs/loader:1117:32)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module._load (node:internal/modules/cjs/loader:958:12)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module.require (node:internal/modules/cjs/loader:1141:19)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at require (node:internal/modules/cjs/helpers:110:18)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Object.<anonymous> (/app/node_modules/@tensorflow/tfjs-node/dist/index.js:72:16)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module._compile (node:internal/modules/cjs/loader:1254:14)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module.load (node:internal/modules/cjs/loader:1117:32)
recipesage-selfhost-ingredient-instruction-classifier-1  |     at Module._load (node:internal/modules/cjs/loader:958:12) {
recipesage-selfhost-ingredient-instruction-classifier-1  |   code: 'ERR_DLOPEN_FAILED'
recipesage-selfhost-ingredient-instruction-classifier-1  | }
recipesage-selfhost-ingredient-instruction-classifier-1  | 
recipesage-selfhost-ingredient-instruction-classifier-1  | Node.js v18.16.0
recipesage-selfhost-ingredient-instruction-classifier-1 exited with code 1

Registering also does not work, i get an 502 (Bad Gateway) error

recipesage-selfhost-proxy-1                              | 2023/05/23 20:30:59 [error] 29#29: *90 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.178.20, server: localhost, request: "POST /api/users/register?false=false& HTTP/1.1", upstream: "http://172.18.0.8:3000/users/register?false=false&", host: "192.168.178.197", referrer: "http://192.168.178.197/"
recipesage-selfhost-proxy-1                              | 192.168.178.20 - - [23/May/2023:20:30:59 +0000] "POST /api/users/register?false=false& HTTP/1.1" 502 559 "http://192.168.178.197/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" "-"

if i run sudo docker network inspect recipesage-selfhost_default i get this. those IPs do not match with the provided proxy.conf (I use fedora server as host)

[docker@recipesage RecipeSage-selfhost]$ sudo docker network inspect recipesage-selfhost_default 
[
    {
        "Name": "recipesage-selfhost_default",
        "Id": "62ddc58157592228c1490bc232c443109c13a16b7e0fcf8ce57a6bb9229ed38f",
        "Created": "2023-05-23T22:13:04.87633465+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "12247f7a32748ba1bce99761a1902fb1fa2dc43dd7da59dc6eb45af8182241d0": {
                "Name": "recipesage-selfhost-proxy-1",
                "EndpointID": "330d8c3fdba663d24b78454b4654f2b6cf1762af5f78490ca11cfea2acf72d70",
                "MacAddress": "02:42:ac:12:00:09",
                "IPv4Address": "172.18.0.9/16",
                "IPv6Address": ""
            },
            "391ad1258a4950633591392899f1b2820aa7a5a0d23ac8552d2b1cb50a0544b9": {
                "Name": "recipesage-selfhost-pushpin-1",
                "EndpointID": "9a68ea873dea89eba0fcdaa9351cbd1f6f4618d5300463b7e2f214882ee76ced",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "4b6b8ffa9b7850bfcb8f1ffe01a9470a933f6f87a80f7462166b0cab48a1342e": {
                "Name": "recipesage-selfhost-browserless-1",
                "EndpointID": "19b496c486780ede063dc0d2b433eb53492dc31d5f100933612489d7fab73409",
                "MacAddress": "02:42:ac:12:00:07",
                "IPv4Address": "172.18.0.7/16",
                "IPv6Address": ""
            },
            "518732da5b39d78d4dea588d58937edb4f75e95d9f3b6f343425e5efc2ff234e": {
                "Name": "recipesage-selfhost-static-1",
                "EndpointID": "cba50640c8d64ac78d55e5e76d5872d4c463ed064850c3e2ebc0d7bfba79ec1d",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            },
            "60e66daaee1c0e0d3b51dc2e16da0c7966a6dc2d53f088a7853190390dacce2e": {
                "Name": "recipesage-selfhost-elasticsearch-1",
                "EndpointID": "82a19737f5aa7dd983270359c7e9aaf545739ddf447a1864621c04ce28d4d168",
                "MacAddress": "02:42:ac:12:00:06",
                "IPv4Address": "172.18.0.6/16",
                "IPv6Address": ""
            },
            "8c35324dd9693aa1502cc5ccf1db40778ea19f912c6a906988ecfc97d7509965": {
                "Name": "recipesage-selfhost-postgres-1",
                "EndpointID": "a469e170b8e22233535979175f918388a937f70f6731d00925ddf7c3e5fe9f85",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "bb35f141b60de5fe53955cf20b5aa9b2bfa601527f4ba77dd658bdc77d78689d": {
                "Name": "recipesage-selfhost-api-1",
                "EndpointID": "51b123a10b58dce9cf3941491d9daa28a6b31a79f80565f8bde40060967b7239",
                "MacAddress": "02:42:ac:12:00:05",
                "IPv4Address": "172.18.0.5/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "recipesage-selfhost",
            "com.docker.compose.version": "2.18.1"
        }
    }
]
[docker@recipesage RecipeSage-selfhost]$

ARM64 Images

Hello! I've been a user of RecipeSage for a few months now, and really enjoying it. I was hoping to be able to run the self hosted solution on a Raspberry Pi, but it looks like all images are amd64 only. Is it possible to add ARM64 support as well? Or is something within the solution x86 specific? Thank you!

Different results between official and selfhosted version when importing recipes from URL

Hello,

first sorry to open a thread with the same name. I have some trouble importing recipes.. The problem is the same as in this thread:
#17

On official site the import works fine, but not on selfhosted one. If I can provide more info I will do it ASAP.

This is the "docker ps -a":

docker@xxxx:~/docker/RecipeSage-selfhost$ docker ps -a
CONTAINER ID   IMAGE                                                 COMMAND                  CREATED             STATUS                            PORTS                                   NAMES
e0e5602fdf02   nginx                                                 "/docker-entrypoint.…"   31 minutes ago      Up 31 minutes                     0.0.0.0:9926->80/tcp, :::9926->80/tcp   recipesage-selfhost_proxy_1
3e3b906e4fd6   julianpoy/recipesage-selfhost:api-latest              "docker-entrypoint.s…"   31 minutes ago      Up 31 minutes                     80/tcp                                  recipesage-selfhost_api_1
8d6cff73fa76   minio/mc                                              "sh -c ' /usr/bin/mc…"   31 minutes ago      Exited (0) 12 minutes ago                                                 recipesage-selfhost_create-minio-buckets_1
b9dce1f4e164   postgres                                              "docker-entrypoint.s…"   31 minutes ago      Up 31 minutes                     5432/tcp                                recipesage-selfhost_postgres_1
9bf8338a0e5d   browserless/chrome:1.28.0-chrome-stable               "./start.sh"             31 minutes ago      Up 31 minutes                     3000/tcp                                recipesage-selfhost_browserless_1
7c4a6dcf52ed   docker.elastic.co/elasticsearch/elasticsearch:7.6.1   "/usr/local/bin/dock…"   31 minutes ago      Up 31 minutes                     9200/tcp, 9300/tcp                      recipesage-selfhost_elasticsearch_1
41587ed69607   fanout/pushpin:1.27.0                                 "docker-entrypoint.s…"   31 minutes ago      Up 31 minutes                     5560-5563/tcp, 7999/tcp                 recipesage-selfhost_pushpin_1
d3209470c9ab   julianpoy/ingredient-instruction-classifier:latest    "docker-entrypoint.s…"   31 minutes ago      Restarting (132) 55 seconds ago                                           recipesage-selfhost_ingredient-instruction-classifier_1
41a4e11274d5   minio/minio                                           "/usr/bin/docker-ent…"   31 minutes ago      Up 31 minutes                     9000/tcp                                recipesage-selfhost_minio_1
86d1e125dc2a   julianpoy/recipesage-selfhost:static-latest           "/docker-entrypoint.…"   31 minutes ago      Up 31 minutes                     80/tcp                                  recipesage-selfhost_static_1

And logs from julianpoy/ingredient-instruction-classifier:latest:

docker@xxxx:~/docker/RecipeSage-selfhost$ docker logs d3209470c9ab
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)

Also logs from minio/mc:

docker@xxxx:~/docker/RecipeSage-selfhost$ docker logs 8d6cff73fa76
Added `myminio` successfully.
Bucket created successfully `myminio/recipesage-selfhost`.
Access permission for `myminio/recipesage-selfhost` is set to `public`
Added `myminio` successfully.
mc:  Unable to make bucket `myminio/recipesage-selfhost`. Your previous request to create the named bucket succeeded and you already own it.
Access permission for `myminio/recipesage-selfhost` is set to `public`
Added `myminio` successfully.
mc:  Unable to make bucket `myminio/recipesage-selfhost`. Your previous request to create the named bucket succeeded and you already own it.
Access permission for `myminio/recipesage-selfhost` is set to `public`
Added `myminio` successfully.
mc:  Unable to make bucket `myminio/recipesage-selfhost`. Your previous request to create the named bucket succeeded and you already own it.
Access permission for `myminio/recipesage-selfhost` is set to `public`

Sadly this is as far as I know to go. I have not changed anything, I downloaded git selfhosted folder and started up the docker.

I would be very thankful for solution as I really like this product :)

Unable to Create Account on Self-Hosted Version

I am trying to self-host this on a local linux machine with docker and seem to be having issues with account creation.

It is saying: "An unexpected error has occurred. Please try again" on the account creation page.

When looking into the Static Recipe Sage container I see this error message:

`2021/04/06 16:05:26 [error] 22#22: 2 open() "/usr/share/nginx/html/api/versioncheck" failed (2: No such file or directory), client: 172.24.0.1, server: localhost, request: "GET /api/versioncheck?version=v2.7.3-beta4 HTTP/1.1", host: "sage.***.duckdns.org", referrer: "https://sage.****.duckdns.org/"

2021/04/06 16:06:03 [error] 22#22: 3 open() "/usr/share/nginx/html/api/users/register" failed (2: No such file or directory), client: 172.24.0.1, server: localhost, request: "POST /api/users/register HTTP/1.1", host: "sage.***.duckdns.org", referrer: "https://sage.****.duckdns.org/"`

Also to specify - in the compose file I removed the nginx section because I use Nginx Proxy Manager which handles the proxies for all webapps running on the machine. Not sure if that is what might be causing the issue but it seems like it's looking for some nginx filepath.

Any help is greatly appreciated in understanding what's going on. Thank you for the great work on this app by the way, very well designed and great to see there is a self-host option!

Account Creation Error

Trying to make an account for the first time but I keep getting the following error: An unexpected error occured. Please try again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.