CETEN TV is a web application made to display images on TELECOM Nancy's cafeteria TV.
It also provides an automated tool to generate images from the events of the week.
You should have Docker and Docker Compose installed on your machine.
To make the Traefik reverse proxy work, you should put the following variables in the .env file at the root of the repository:
DOMAINshould be the domain name of the serverEMAILshould be the email address of the administrator of the server, used for Let's EncryptCERT_RESOLVERshould be the name of the certificate resolver used by Traefik (letsencrypt is recommended)
The client requires the following environment variables:
GOOGLE_CLIENT_IDshould be the Google OAuth client IDGOOGLE_CLIENT_SECRETshould be the Google OAuth client secretAUTH_SECRETshould be a secret used to sign the authentication cookies. You can generate one withopenssl rand -hex 32NEXTAUTH_URLshould be the URL of the server, with the protocol (e.g.https://raspberry-cafet.telecomnancy.univ-lorraine.fr)USER_WHITELISTshould be a semicolon-separated list of Google account IDs that can access the admin interface
Redis (used to remember wich images are displayed or hidden) requires the following environment variables:
REDIS_PASSWORDshould be the password of the Redis server. You can generate one withopenssl rand -base64 32
To make the automated calendar image generator work, you should put the credentials.json and token.json files from the Google Cloud Platform in the calendar/config folder.
You also need to set the CALENDAR_URL environment variable to the URL of the calendar to use.
The calendar images are generated automatically every day at 7:00, 12:00 and 17:00. This can be changed in the calendar/config/cron file.
The slideshow is made of images in the images folder. The images are displayed in alphabetical order. It is displayed on the / route.
The admin interface is available on the /admin route. It allows you to upload images to display them on the TV, or hide displayed images. It is protected by Google OAuth, and only users in the USER_WHITELIST can access it.
The Traefik dashboard is available on the https://traefik.DOMAIN route.
A development environment is available with Docker Compose. To start it, run docker-compose -f docker-compose.dev.yml up -d. The app will be available the same way as in production, with everything running on localhost and hot module reloading working.