Hello,
I am having issues understanding the redis configuration for docker
They are no redis related variables here:
Bringing up my docker compose with not specifying anything beyond that, will bring constantly this error:
If I set password via this:
I get the following error:
This is my current docker compose:
services:
# You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
# webserver:
# image: chocobozzz/peertube-webserver:latest
# # If you don't want to use the official image and build one from sources:
# # build:
# # context: .
# # dockerfile: ./support/docker/production/Dockerfile.nginx
# env_file:
# - .env
# ports:
# - "800:80"
# - "4433:443"
# volumes:
# - type: bind
# # Switch sources if you downloaded the whole repository
# #source: ../../nginx/peertube
# source: ./docker-volume/nginx/peertube.file
# target: /etc/nginx/conf.d/peertube.template
# - assets:/var/www/peertube/peertube-latest/client/dist:ro
# - ./docker-volume/data:/var/www/peertube/storage
# - certbot-www:/var/www/certbot
# - ./docker-volume/certbot/conf:/etc/letsencrypt
# depends_on:
# - peertube
# restart: "always"
# You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
# certbot:
# container_name: certbot
# image: certbot/certbot
# volumes:
# - ./docker-volume/certbot/conf:/etc/letsencrypt
# - certbot-www:/var/www/certbot
# restart: unless-stopped
# entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
# depends_on:
# - webserver
peertube:
# If you don't want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.bookworm
image: chocobozzz/peertube:production-bookworm
# Use a static IP for this container because nginx does not handle proxy host change without reload
# This container could be restarted on crash or until the postgresql database is ready for connection
#networks:
#default:
#ipv4_address: 172.26.0.20
#ipv6_address: fdab:e4b3:21a2:ef1b::42
env_file:
- stack.env
#ports:
#- "1935:1935" # Comment if you don't want to use the live feature
#- "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
volumes:
# Remove the following line if you want to use another webserver/proxy or test PeerTube in local
# - assets:/app/client/dist
- ${WD}/docker-volume/data:/data
- ${WD}/docker-volume/config:/config
depends_on:
- postgres
- redis
- postfix
environment:
- PEERTUBE_REDIS_HOSTNAME=peertube_redis
- PEERTUBE_REDIS_PORT=6379 # Redis port
- PEERTUBE_REDIS_AUTH=NOAUTH
restart: "always"
postgres:
image: postgres:13-alpine
env_file:
- stack.env
volumes:
- ${WD}/docker-volume/db:/var/lib/postgresql/data
restart: "always"
pgbackups:
image: prodrigestivill/postgres-backup-local
restart: always
#user: postgres:postgres # Optional: see below
volumes:
- ${SB}:/backups
links:
- postgres
depends_on:
- postgres
environment:
- POSTGRES_HOST=postgres
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# - POSTGRES_PASSWORD_FILE=/run/secrets/db_password <-- alternative for POSTGRES_PASSWORD (to use with docker secrets)
- POSTGRES_EXTRA_OPTS=-Z1 --schema=public --blobs
- SCHEDULE=@daily
- BACKUP_ON_START=TRUE
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
#- HEALTHCHECK_PORT=8080
redis:
image: redis:6-alpine
hostname: "peertube_redis"
volumes:
- ${WD}/docker-volume/redis:/data
environment:
- REDIS_PASSWORD=${REDIS_PW}
restart: "always"
postfix:
image: mwader/postfix-relay
env_file:
- stack.env
volumes:
- ${WD}/docker-volume/opendkim/keys:/etc/opendkim/keys
restart: "always"
networks:
default:
external: true
name: ext
enable_ipv6: false
#ipam:
#driver: default
#config:
#- subnet: 172.26.0.0/16
#- subnet: fdab:e4b3:21a2:ef1b::/64
and my stack.env:
POSTGRES_USER=db_user
POSTGRES_PASSWORD=db_pwd
POSTGRES_DB=peertube
PEERTUBE_DB_NAME=peertube
PEERTUBE_DB_USERNAME=db_user
PEERTUBE_DB_PASSWORD=db_pwd
PEERTUBE_DB_SSL=false
PEERTUBE_DB_HOSTNAME=feditubo-postgres-1
PEERTUBE_WEBSERVER_HOSTNAME=my_domain
PEERTUBE_WEBSERVER_HTTPS=true
PEERTUBE_SECRET=secret
PEERTUBE_SMTP_USERNAME=admin@my_domain
PEERTUBE_SMTP_PASSWORD=smtp_pw
PEERTUBE_SMTP_HOSTNAME=smtp.server
PEERTUBE_SMTP_PORT=587
PEERTUBE_SMTP_FROM=admin@my_domain
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL=admin@my_domain
POSTFIX_myhostname=my_domain
OPENDKIM_DOMAINS=my_domain=peertube
OPENDKIM_RequireSafeKeys=no
PEERTUBE_OBJECT_STORAGE_ENABLED=true
PEERTUBE_OBJECT_STORAGE_ENDPOINT=s3.server
PEERTUBE_OBJECT_STORAGE_REGION=region
PEERTUBE_OBJECT_STORAGE_PROXY_PROXIFY_PRIVATE_FILES=true
PEERTUBE_OBJECT_STORAGE_CREDENTIALS_ACCESS_KEY_ID=id
PEERTUBE_OBJECT_STORAGE_CREDENTIALS_SECRET_ACCESS_KEY=secret
PEERTUBE_OBJECT_STORAGE_MAX_UPLOAD_PART=1000000000
PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BUCKET_NAME=feditubo
PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_PREFIX=streaming-playlists/
PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL=https://feditubo.s3.server
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL=public
PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BUCKET_NAME=fedituboyt
PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_PREFIX=web-videos/
PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BASE_URL=https://feditubo.s3.server
WD=/home/kireek/docker/feditubo
SB=/mnt/backrest/mysqlbackup/peertube
private_files_require_auth=true
REDIS_PW=NOAUTH
what I fail to understand is how to apply this: PeerTube/support/docker/production/config/custom-environment-variables.yaml at develop · Chocobozzz/PeerTube · GitHub
in this context. do these goes in the compose, in the environment of peertube, of redis? do they do in environment variable? are they keys, values? both?
in short: please explain how to configure redis in docker setup please.
thank you very much!