You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-14Lines changed: 24 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,28 +18,28 @@ Warning: There are portions of the software that may not work. I don't warranty
18
18
19
19
## Setup
20
20
21
+
For Synology boxes, see [this setup guide instead](./SETUP-SYNOLOGY.md).
22
+
21
23
1. You'll need Docker to run [RecipeSage](https://recipesage.com) locally. Although you _can_ attempt to run it without Docker, you're on your own.
22
24
2. Start all containers with `docker compose up -d`
23
-
3. On first run, and when updating, you'll need to run database migrations with `./migrate.sh`
24
-
4. The app should be available at port 80. You can change that by changing [this](https://github.com/julianpoy/RecipeSage-selfhost/blob/a1133c51af24ca78f9bc9537e147411b5e7e311a/docker-compose.yml#L8) to something else, such as `3000:80` for port 3000.
25
+
3. The app should be available at port 7270. You can change that by changing [this](https://github.com/julianpoy/RecipeSage-selfhost/blob/a1133c51af24ca78f9bc9537e147411b5e7e311a/docker-compose.yml#L8) to something else, such as `3000:80` for port 3000.
25
26
26
-
### Updating
27
+
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](https://caddyserver.com/docs/install) or [Nginx Proxy Manager](https://nginxproxymanager.com/guide) if you are unfamiliar with reverse proxies. A reverse proxy isn't strictly necessary to use RecipeSage self-hosted, however.
27
28
28
-
First, take a look at the changelog below for any special upgrade notes. Then follow the steps below.
29
+
### Updating
29
30
30
-
As with any migration/upgrade, I recommend taking a backup of your volumes before migrating to avoid any potential data loss.
31
+
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.
31
32
32
-
Update your local copy of this repo with the latest from this repository. If cloned with Git, this is as simple as `git pull`.
33
+
1.[_Take a look at the changelog below for any special upgrade notes_](#changelog). Then follow the steps below.
33
34
34
-
Update your local images: `docker compose pull`.
35
+
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`.
35
36
36
-
Then, down & up the containers: `docker compose down --remove-orphans && docker compose up -d`
37
+
3. Update your local images: `docker compose pull`.
37
38
38
-
Finally, run any pending migrations with `./migrate.sh`
39
+
4. Down & up the containers: `docker compose down --remove-orphans && docker compose up -d`
39
40
40
41
<br />
41
42
42
-
43
43
## Customization
44
44
45
45
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.
@@ -68,11 +68,11 @@ It's fairly common that older CPUs (often shipped in prebuilt NASes) do not supp
68
68
69
69
> Illegal Instruction (core dumped)
70
70
71
-
Since the ingredient-instruction-classifier container is not _required_ by RecipeSage, it can be removed/disabled from the docker-compose file if you don't have AVX instruction set support. Without the ingredient-instruction-classifier container, the automatic recipe import feature will still work on the majority of sites, but will be unable to pull content from sites that are particularly poorly formatted, or that have no metadata at all.
71
+
Since the ingredient-instruction-classifier container is not _required_ by RecipeSage, **it can be removed/disabled** from the docker-compose file if you don't have AVX instruction set support. Without the ingredient-instruction-classifier container, the automatic recipe import feature will still work on the majority of sites, but will be unable to pull content from sites that are particularly poorly formatted, or that have no metadata at all.
72
72
73
73
#### I'm seeing an "unexpected error occurred" error when trying to register
74
74
75
-
This is most frequently because the migration script has not been run successfully. Note that if you change the name of the containers in the docker-compose file, the migration script will not be able to run the required migration script within the container, and you must do so by exec-ing into the container yourself, similar to what the script does.
75
+
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.
76
76
77
77
#### Container Structure
78
78
@@ -90,12 +90,22 @@ The `pushpin` container is a broker for all websocket connections. Without it, a
90
90
91
91
The `postgres` container is the database. The application cannot run without it.
92
92
93
-
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.
93
+
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.
94
94
95
-
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 _should still work_, but will be a bit less accurate or may not be able to pull ingredients or instructions from poorly formatted webpages.
95
+
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.
96
96
97
97
## Changelog
98
98
99
+
### v4.0.0
100
+
101
+
Migrations are now automated, and use a different migration tool.
102
+
103
+
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:
104
+
105
+
1. Update your local copy of the repository to v4.0.0
106
+
2. Run `docker compose exec api tsx packages/backend/src/migrate`
107
+
3. If the command prior ran successfully, run `docker compose exec api npx prisma migrate resolve --applied 0_init`
108
+
99
109
### v3.1.0
100
110
101
111
`docker-compose` has been officially deprecated, so the app has migrated to using `docker compose`.
**Note** that you'll paste in the docker-compose.yml file that you copied above into this dialogue.
29
+
30
+
Click next.
31
+
32
+
## Step 4
33
+
34
+
On the next page, you'll be presented with a dialogue asking if you want to provide web services to the created containers. You'll want to enable HTTP on port 7270 to the proxy container as shown below.
At this point you may see a few modals pop up. One should be showing you the download & extracting progress for all of the RecipeSage containers. You'll also see a prompt like below regarding the web service configuration.
Leave all of the settings default, but fill in the hostname field with the domain name you'd like to use for RecipeSage if you have one, such as (recipesage.yourdomain.com). If not, and you're just planning to use RecipeSage within your local network, just enter `recipesage` into this field and click the create button.
55
+
56
+
## Step 7
57
+
58
+
Once the download & extracting progress window has completed, you should see text in that window similar to the following.
Navigate to http://YOUR_SYNOLOGY_IP_ADDRESS:7270 in your web browser, and you should see the RecipeSage interface!
67
+
68
+
## Further Steps
69
+
70
+
These steps are very well documented across the internet, and I recommend Googling for help here if you are unfamiliar with these concepts. Please do not open issues related to the following steps.
71
+
72
+
If you entered a domain name for RecipeSage in step 6, you'll want to:
73
+
74
+
- Follow [Synology's guide for getting an HTTPS certificate](https://kb.synology.com/en-my/DSM/tutorial/How_to_enable_HTTPS_and_create_a_certificate_signing_request_on_your_Synology_NAS) if you don't have a certificate for this domain name already configured. You can manage certificates and their assignments within `Control Panel -> Security -> Certificate`.
75
+
- Port forward port 80 & 443 via your router to your Synology box. (Google the model of your router for instructions for how to do this)
76
+
- Follow [Synology's guide for setting up DDNS for your domain](https://kb.synology.com/en-us/DSM/help/DSM/AdminCenter/connection_ddns?version=7)
77
+
78
+
If you've followed all of the steps above, you should be able to access RecipeSage via the domain you configured.
79
+
80
+
## Updating
81
+
82
+
First, check any notes regarding the new version you'll be updating to [here](https://github.com/julianpoy/recipesage-selfhost#changelog) since there may be additional steps required.
83
+
84
+
To update your copy of RecipeSage on your Synology NAS, first stop RecipeSage via the `Container Manager -> Project` interface.
85
+
86
+
After all of the associated RecipeSage containers stop, navigate to the `YAML Configurations` tab within the RecipeSage project you set up.
87
+
88
+
Copy the latest docker-compose.yaml from here [from here](https://raw.githubusercontent.com/julianpoy/RecipeSage-selfhost/main/docker-compose.yml), and replace the content of the `YAML Configurations` window with the content of the new docker-compose.yml file.
89
+
90
+
Click Save and select `Build and start the project (rebuild the image)`.
91
+
92
+
RecipeSage should be updated. Again, please perform any additional steps described [here](https://github.com/julianpoy/recipesage-selfhost#changelog) if required.
# Uncomment the lines below to enable the ingredient instruction classifier. It's somewhat resource intensive and requires AVX instruction support on your CPU, but does improve site compatibility for the automatic import tool.
97
+
98
+
# ingredient-instruction-classifier: # A mini server that runs a machine learning model able to classify text for improved automatic import site support. Not required for application to run, and will crash if your CPU does not support AVX instructions
0 commit comments