Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions services/tandoor/.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,29 @@ SERVICEPORT=9001
DNS_SERVER=9.9.9.9

# Tailscale Configuration
# Generate a reusable or ephemeral auth key in the Tailscale admin console.
# Do not commit a real auth key to Git.
TS_AUTHKEY=

# Time Zone setting for containers
TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

# Optional Service variables
# PUID=1000

# random secret key, use for example `base64 /dev/urandom | head -c50` to generate one
SECRET_KEY=

# allowed hosts (see documentation), should be set to your hostname(s) but might be * (default) for some proxies/providers
ALLOWED_HOSTS=tandoor.yourtailnet.ts.net

# 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
# Time Zone setting for containers
TZ=Europe/Amsterdam

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=postgres
# Tandoor Configuration
# Generate with: base64 /dev/urandom | head -c50
# Do not commit a real production secret to Git.
SECRET_KEY=REPLACE_WITH_RANDOM_SECRET

# Allowed hosts should match your Tailscale Serve hostname.
ALLOWED_HOSTS=tandoor.example.ts.net

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=tandoor
# PostgreSQL Configuration
DB_ENGINE=django.db.backends.postgresql
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=REPLACE_WITH_RANDOM_ALPHANUMERIC_PASSWORD
POSTGRES_DB=tandoor

#EXAMPLE_VAR="Environment varibale"
# Optional Service variables
# PUID=1000
# PGID=1000
12 changes: 5 additions & 7 deletions services/tandoor/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@ services:
network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale
container_name: app-${SERVICE} # Name for local container management
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- TANDOOR_PORT=${SERVICEPORT}
volumes:
- ./${SERVICE}-data/staticfiles:/opt/recipes/statisfiles
- ./${SERVICE}-data/staticfiles:/opt/recipes/staticfiles
- ./${SERVICE}-data/mediafiles:/opt/recipes/mediafiles
env_file:
- ./.env
Expand All @@ -80,13 +78,13 @@ services:
network_mode: service:tailscale
container_name: app-${SERVICE}-database
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./${SERVICE}-data/database:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE_NAME}"] # Check if postgres is ready
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] # Check if postgres is ready
interval: 1m # How often to perform the check
timeout: 10s # Time to wait for the check to succeed
retries: 3 # Number of retries before marking as unhealthy
Expand Down