Skip to content

Commit 7014647

Browse files
authored
Added Tandoor Recipes (New Service: Tandoor Recipes (#161)
Fixes #160)
1 parent 4df30fe commit 7014647

File tree

5 files changed

+146
-0
lines changed

5 files changed

+146
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ If you would like to add your own config, you can use the [service-template](tem
149149
| 🥘 Service | 📝 Description | 🔗 Link |
150150
| ------------ | -------------------------------------------------------------------------------------------------------- | -------------------------- |
151151
| 🥘 **Mealie** | A self-hosted recipe manager and meal planner with features like shopping lists, scaling, and importing. | [Details](services/mealie) |
152+
| 🥘 **Tandoor Recipes** | A self-hosted recipe manager that also serves as a meal planner that has features such as nutrient tracking, shopping lists, importing and AI. | [Details](services/tandoor) |
152153

153154
## Tailscale Information
154155

services/tandoor/.env

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#version=1.0
2+
#url=https://github.com/2Tiny2Scale/tailscale-docker-sidecar-configs
3+
#COMPOSE_PROJECT_NAME= // only use in multiple deployments on the same infra
4+
SERVICE=tandoor
5+
IMAGE_URL=vabene1111/recipes
6+
SERVICEPORT=9001
7+
TS_AUTHKEY=
8+
DNS_SERVER=9.9.9.9
9+
10+
# Custom Tandoor Recipes - https://docs.tandoor.dev/install/docker/#docker-compose
11+
12+
# Visit the docs to find more supported env variables - https://docs.tandoor.dev/system/configuration/
13+
14+
# random secret key, use for example `base64 /dev/urandom | head -c50` to generate one
15+
SECRET_KEY=
16+
17+
# allowed hosts (see documentation), should be set to your hostname(s) but might be * (default) for some proxies/providers
18+
ALLOWED_HOSTS=tandoor.yourtailnet.ts.net
19+
20+
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
21+
TZ=Europe/Amsterdam
22+
23+
# Connection secret for postgres. You should change it to a random password
24+
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
25+
DB_PASSWORD=postgres
26+
27+
# The values below this line do not need to be changed
28+
###################################################################################
29+
DB_USERNAME=postgres
30+
DB_DATABASE_NAME=tandoor

services/tandoor/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Tandoor Recipes with Tailscale Sidecar Configuration
2+
3+
This Docker Compose configuration sets up [**Tandoor Recipes**](https://github.com/TandoorRecipes/recipes) with Tailscale as a sidecar container, which enables a secure access to your personal recipe and meal planning platform from your Tailscale network. As with all other services inside this repository, your service stays fully private and accessible only to your authorized devices.
4+
5+
## Tandoor Recipes
6+
7+
[**Tandoor Recipes**](https://github.com/TandoorRecipes/recipes) is an application for managing recipes, planning meals, building shopping lists and much much more:
8+
9+
- 🥗 **Manage your recipes** - Manage your ever growing recipe collection
10+
- 📆 **Plan** - multiple meals for each day
11+
- 🛒 **Shopping lists** - via the meal plan or straight from recipes
12+
- 🪄 **use AI** to recognize images, sort recipe steps, find nutrition facts and more
13+
- 📚 **Cookbooks** - collect recipes into books
14+
- 👪 **Share and collaborate** on recipes with friends and family
15+
16+
## Configuration Overview
17+
18+
In this setup, the `tailscale-tandoor` service runs Tailscale, which manages secure networking for the service. The `tandoor` service utilizes the Tailscale network stack via Docker's `network_mode: service:tailscale-tandoor` configuration. This setup ensures that tandoor's service is only accessible through the Tailscale network (or locally, if preferred), providing an extra layer of security and privacy for your service.

services/tandoor/config/serve.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"TCP": {
3+
"443": {
4+
"HTTPS": true
5+
}
6+
},
7+
"Web": {
8+
"${TS_CERT_DOMAIN}:443": {
9+
"Handlers": {
10+
"/": {
11+
"Proxy": "http://127.0.0.1:9001"
12+
}
13+
}
14+
}
15+
}
16+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
services:
2+
# Make sure you have updated/checked the .env file with the correct variables.
3+
# All the ${ xx } need to be defined there.
4+
# Tailscale Sidecar Configuration
5+
tailscale:
6+
image: tailscale/tailscale:latest # Image to be used
7+
container_name: tailscale-${SERVICE} # Name for local container management
8+
hostname: ${SERVICE} # Name used within your Tailscale environment
9+
environment:
10+
- TS_AUTHKEY=${TS_AUTHKEY}
11+
- TS_STATE_DIR=/var/lib/tailscale
12+
- TS_SERVE_CONFIG=/config/serve.json # Tailscale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required
13+
- TS_USERSPACE=false
14+
- TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz"
15+
- TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The <addr>:<port> for the healthz endpoint
16+
#- TS_ACCEPT_DNS=true # Uncomment when using MagicDNS
17+
volumes:
18+
- ./config:/config # Config folder used to store Tailscale files - you may need to change the path
19+
- ./ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path
20+
devices:
21+
- /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work
22+
cap_add:
23+
- net_admin # Tailscale requirement
24+
#ports:
25+
# - 0.0.0.0:${SERVICEPORT}:${SERVICEPORT} # Binding port ${SERVICE}PORT to the local network - may be removed if only exposure to your Tailnet is required
26+
# If any DNS issues arise, use your preferred DNS provider by uncommenting the config below
27+
#dns:
28+
# - ${DNS_SERVER}
29+
healthcheck:
30+
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational
31+
interval: 1m # How often to perform the check
32+
timeout: 10s # Time to wait for the check to succeed
33+
retries: 3 # Number of retries before marking as unhealthy
34+
start_period: 10s # Time to wait before starting health checks
35+
restart: always
36+
37+
# ${SERVICE}
38+
application:
39+
image: ${IMAGE_URL} # Image to be used
40+
network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale
41+
container_name: app-${SERVICE} # Name for local container management
42+
environment:
43+
- PUID=1000
44+
- PGID=1000
45+
- TZ=${TZ}
46+
- TANDOOR_PORT=${SERVICEPORT}
47+
volumes:
48+
- ./${SERVICE}-data/staticfiles:/opt/recipes/statisfiles
49+
- ./${SERVICE}-data/mediafiles:/opt/recipes/mediafiles
50+
env_file:
51+
- ./.env
52+
depends_on:
53+
tailscale:
54+
condition: service_healthy
55+
database:
56+
condition: service_healthy
57+
healthcheck:
58+
test: ["CMD", "pgrep", "-f", "${SERVICE}"] # Check if ${SERVICE} process is running
59+
interval: 1m # How often to perform the check
60+
timeout: 10s # Time to wait for the check to succeed
61+
retries: 3 # Number of retries before marking as unhealthy
62+
start_period: 30s # Time to wait before starting health checks
63+
restart: always
64+
65+
database:
66+
image: postgres:16-alpine
67+
network_mode: service:tailscale
68+
container_name: app-${SERVICE}-database
69+
environment:
70+
POSTGRES_PASSWORD: ${DB_PASSWORD}
71+
POSTGRES_USER: ${DB_USERNAME}
72+
POSTGRES_DB: ${DB_DATABASE_NAME}
73+
volumes:
74+
- ./${SERVICE}-data/database:/var/lib/postgresql/data
75+
healthcheck:
76+
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE_NAME}"] # Check if postgres is ready
77+
interval: 1m # How often to perform the check
78+
timeout: 10s # Time to wait for the check to succeed
79+
retries: 3 # Number of retries before marking as unhealthy
80+
start_period: 30s # Time to wait before starting health checks
81+
restart: always

0 commit comments

Comments
 (0)