2021-10-16 08:28:43 +02:00
2021-05-10 09:55:04 +02:00
2021-05-19 15:54:06 +02:00
2021-05-19 15:54:06 +02:00
2021-05-09 21:07:52 +02:00
2021-05-19 15:54:06 +02:00
2021-10-16 08:26:53 +02:00
2021-10-16 08:28:43 +02:00

Surprise countdown

This is a web application for revealing a surprise at a given time.

Surprise countdown

Two pages are served:

  1. / - The index page polls the backend every second and displays the image asset corresponding to the state of the surprise with a countdown if applicable.
  2. /set-surprise - Select and POST the surprise to the backend (password protected).

The surprise can have the following states:

  • _null - The surprise is not set.
  • _secret - The surprise is set but not yet revealed.
  • <value> - The surprise is set and revealed.

Configuration

Environment variables:

  • SURPRISE_TITLE - Page title
  • SURPRISE_STORE_FILE - File name to store surprise value.
  • SURPRISE_SECRET - Password for setting the surprise.
  • SURPRISE_ASSET_DIR - Directory of image assets that corresponds to surprise state/values. The set of possible surprise values are parsed from the basename of the asset files. The _null and _secret states may be overridden.
  • SURPRISE_REVEAL_DATETIME - Datetime for reveal.

Build

$ docker build -t surprise-countdown .

Run gender reveal example

$ docker run -e SURPRISE_SECRET=hunter2 -p 5000:5000 -v $(pwd)/surprise-assets/gender-reveal:/assets:ro surprise-countdown

Then browse to localhost:5000.

Description
Web application for revealing a surprise at a given time.
Readme 3.9 MiB
Languages
Python 39.9%
HTML 27.4%
Elm 27.2%
Dockerfile 5.5%