v4.0.0. Release 🎅🎄
Warning
Contains changes to the compose file providing a simpler way to run Ganymede
Reduce The Number of Containers
Running Ganymede now only requires two containers! 🎉 The Ganymede container and a PostgreSQL database. The frontend, nginx, and River UI containers have been removed or bundled into the main image. This decreases the barrier of entry to running Ganymede and will hopefully remove confusion between the containers. This requires changes to your compose file, specifically:
- Removing the Frontend service (if using)
- Move the non-
*_URL
environment variables to the Ganymede service. Remove the*_URL
env vars entirely.
- Move the non-
- Removing the Nginx service (if using)
- Removing the River UI service (if using)
See the below diff or the docker-compose.yml
in the repository for more information.
services:
- ganymede-api:
- container_name: ganymede-api
+ ganymede:
+ container_name: ganymede
image: ghcr.io/zibbp/ganymede:latest
restart: unless-stopped
depends_on:
- ganymede-db
environment:
- DEBUG=false
- TZ=America/Chicago # Set to your timezone
# Data paths in container; update the mounted volume paths as well
- VIDEOS_DIR=/data/videos
- TEMP_DIR=/data/temp
- LOGS_DIR=/data/logs
- CONFIG_DIR=/data/config
# Database settings
- DB_HOST=ganymede-db
- DB_PORT=5432
- DB_USER=ganymede
- DB_PASS=PASSWORD
- DB_NAME=ganymede-prd
- DB_SSL=disable
- #- DB_SSL_ROOT_CERT= # path to cert in the container if DB_SSL is not disabled
- - JWT_SECRET=SECRET # set as a random string
- - JWT_REFRESH_SECRET=SECRET # set as a random string
+ # - DB_SSL_ROOT_CERT= # path to cert in the container if DB_SSL is not disabled
- TWITCH_CLIENT_ID= # from your twitch application
- TWITCH_CLIENT_SECRET= # from your twitch application
- - FRONTEND_HOST=http://IP:PORT # URL to the frontend service. Needs to be the 'public' url that you visit.
- #- COOKIE_DOMAIN= # Optional domain that the cookies will be set to. Should be the top level domain with a reverse proxy (e.g. `domain.com`).
# Worker settings. Max number of tasks to run in parallel per type.
- MAX_CHAT_DOWNLOAD_EXECUTIONS=3
- MAX_CHAT_RENDER_EXECUTIONS=2
- MAX_VIDEO_DOWNLOAD_EXECUTIONS=2
- MAX_VIDEO_CONVERT_EXECUTIONS=3
# Optional OAuth settings
# - OAUTH_ENABLED=false
# - OAUTH_PROVIDER_URL=
# - OAUTH_CLIENT_ID=
# - OAUTH_CLIENT_SECRET=
# - OAUTH_REDIRECT_URL=http://IP:PORT/api/v1/auth/oauth/callback # Points to the API service
+ # Optional Frontend settings
+ - SHOW_SSO_LOGIN_BUTTON=true
+ - FORCE_SSO_AUTH=false
+ - REQUIRE_LOGIN=false
volumes:
- /path/to/vod/storage:/data/videos # update VIDEOS_DIR env var
- ./temp:/data/temp # update TEMP_DIR env var
- ./logs:/data/logs # queue logs
- ./config:/data/config # config and other miscellaneous files
ports:
- 4800:4000
- ganymede-frontend:
- container_name: ganymede-frontend
- image: ghcr.io/zibbp/ganymede-frontend:latest
- restart: unless-stopped
- environment:
- - API_URL=http://IP:PORT # Points to the API service; the container must be able to access this URL internally
- - CDN_URL=http://IP:PORT # Can point to your nginx service, or set same as API_URL if nginx is not used
- - SHOW_SSO_LOGIN_BUTTON=true # show/hide SSO login button on login page
- - FORCE_SSO_AUTH=false # force SSO auth for all users (bypasses login page and redirects to SSO)
- - REQUIRE_LOGIN=false # require login to view videos
- ports:
- - 4801:3000
+ healthcheck:
+ test: curl --fail http://localhost:4000/health || exit 1
+ interval: 60s
+ retries: 5
+ start_period: 60s
+ timeout: 10s
ganymede-db:
container_name: ganymede-db
image: postgres:14
volumes:
- ./ganymede-db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=PASSWORD
- POSTGRES_USER=ganymede
- POSTGRES_DB=ganymede-prd
ports:
- - 4803:5432
- # Nginx is not really required, it provides nice-to-have caching. The API container will serve the VIDEO_DIR env var path if you want to use that instead (e.g. VIDEOS_DIR=/data/videos would be served at IP:4800/data/videos/channel/channel.jpg).
- ganymede-nginx:
- container_name: ganymede-nginx
- image: nginx
- volumes:
- - /path/to/nginx.conf:/etc/nginx/nginx.conf:ro
- - /pah/to/vod/stoage:/data/videos
- ports:
- - 4802:8080
- # River UI is a frontend for the task system that Ganymede uses. This provides a more in-depth look at the task queue.
- ganymede-river-ui:
- image: ghcr.io/riverqueue/riverui:0.3
- environment:
- - DATABASE_URL=postgres://ganymede:DB_PASSWORD@ganymede-db:5432/ganymede-prd # update with env settings from the ganymede-db container. If you're using the default database settings then just update the DB_PASSWORD env var.
- ports:
- - 4804:8080
+ - 4801:5432
+ restart: unless-stopped
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready", "-d", "{{ ganymede_db_name }}"]
+ interval: 30s
+ timeout: 60s
+ retries: 5
+ start_period: 60s
The Frontend is no longer available to run standalone. If this is something you would still like to do, open an issue. Additionally I no longer recommend using Nginx. If you still would like to, add the CDN_URL
to the Ganymede service environment variables.
This will hopefully be the final "breaking" change to the compose file as I don't plan on adding any additional logic that cannot run in the Ganymede container.
Clip Archiving
The first iteration of clip archiving is here. This can be configured for a watched channel allowing archiving the top number
of clips the past interval
days.
Additionally this means you can archive clips by providing the clip URL or ID on the archive page.
When watching a clip and if the video is also archived, a button will appear that takes you to the clip's position in the video.
If a video has clips related to it they will appear under the video player.
Frontend Rewrite
The frontend has been entirely rewritten. The UI is mostly the same still, mainly cleaning up the code. The video chat player has been entirely removed. The performance of the "real time" chat player should be much better in v4.
Video Thumbnail Sprites
Archived Twitch VODs will now download the "sprite thumbnails" if the VOD as them available. This provides a quick glance at any given position in a video.
An EXPERIMENTAL feature is also available to generate the "sprite thumbnails" for live stream, clips, or VODs that do not have sprite thumbnails from Twitch. To generate the sprites click the button in the video menu.
Generating sprites will take a few minutes for longer videos. This is not CPU intensive. During this experimental phase only one of these tasks is allowed to run at once. Vising the new "tasks" tab in the Frontend for more information.
An Admin task also exists to generate "sprite thumbnails" for all videos.
There isn't any automation for this yet as it is still experimental. Once I am happy with this feature it will be automated and run after every video archive.
Chat Histogram
Below the video player a chat histogram is available. This provides a way to quickly pinpoint exciting parts of streams (assuming comment count is related to that). This can be optionally disabled in your user settings.
Other Miscellaneous Change s
- Replace JWT for Session based authentication
- You can safely remove the
JWT*
environment variables from the Ganymede server
- You can safely remove the
- Normalize API responses. API responses will now look like the following.
{
"success": false, // boolean of operation status
"data": null, // the data of the request, usually an object or array
"message": "updated video" // brief message of the request/operation
}
What's Changed
- add environment variable to enable/disable path migration at startup by @Entrivax in #537
- feat: v4 by @Zibbp in #548
Full Changelog: v3.1.0...v4.0.0