diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f48ebe8d..48098b6be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,17 @@ release channel, you can take advantage of these new features and fixes. ## Code Quality/Technical Changes -- +- The main web Docker container will now automatically initialize itself upon startup, performing essential tasks like + updating the database, clearing the cache and ensuring the system is set up properly. This means even if you miss a + step in installation (or use the Docker images directly) they should still work without issue. + +- You can optionally disable Redis entirely, instead relying on flatfile caches for session management and other Redis + functions by setting `ENABLE_REDIS=false` in `azuracast.env`. This is not recommended for most users as Redis offers + great performance, but if you are looking to minimize the number of running containers, this is a viable option. + +- One of the biggest issues with Docker file mounting has been permissions; you can now set a custom UID/GID for the + running user inside the Docker containers, to match the one you use in your host operating system. + Set `AZURACAST_PUID` and `AZURACAST_PGID` in `.env` accordingly; both default to 1000. ## Bug Fixes diff --git a/docker-compose.sample.yml b/docker-compose.sample.yml index 7415781c7..0569a0375 100644 --- a/docker-compose.sample.yml +++ b/docker-compose.sample.yml @@ -67,6 +67,8 @@ services : NGINX_TIMEOUT : ${NGINX_TIMEOUT:-1800} LETSENCRYPT_HOST : ${LETSENCRYPT_HOST} LETSENCRYPT_EMAIL : ${LETSENCRYPT_EMAIL} + PUID : ${AZURACAST_PUID:-1000} + PGID : ${AZURACAST_PGID:-1000} volumes : - letsencrypt:/etc/nginx/certs:ro - www_vendor:/var/azuracast/www/vendor @@ -115,6 +117,9 @@ services : stations : container_name : azuracast_stations image : "ghcr.io/azuracast/radio:${AZURACAST_VERSION:-latest}" + environment : + PUID : ${AZURACAST_PUID:-1000} + PGID : ${AZURACAST_PGID:-1000} ports : # This default mapping is the outgoing and incoming ports for the first 50 stations. # You can override this port mapping in your own docker-compose.override.yml file. diff --git a/sample.env b/sample.env index 43e93f9b5..303905de1 100644 --- a/sample.env +++ b/sample.env @@ -5,4 +5,7 @@ AZURACAST_HTTPS_PORT=443 AZURACAST_SFTP_PORT=2022 +AZURACAST_PUID=1000 +AZURACAST_PGID=1000 + NGINX_TIMEOUT=1800 diff --git a/util/docker/web/startup_scripts/00_setup_user.sh b/util/docker/web/startup_scripts/00_setup_user.sh new file mode 100644 index 000000000..6336aa344 --- /dev/null +++ b/util/docker/web/startup_scripts/00_setup_user.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +PUID=${PUID:-1000} +PGID=${PGID:-1000} + +groupmod -o -g "$PGID" azuracast +usermod -o -u "$PUID" azuracast + +echo "Docker 'azuracast' User UID: $(id -u azuracast)" +echo "Docker 'azuracast' User GID: $(id -g azuracast)"