Wire app for the polls.
Based on Wire Applications JVM SDK, which offers full support for MLS.
Previous Poll Bot implementation was based on Roman therefore did not employ E2EE directly, and worked with Proteus protocol only.
Basic usage
/poll "Question" "Option 1" "Option 2"
will create poll/poll help
to show help/poll version
prints the current version of the poll app
- HTTP Server for Prometheus - Ktor
- Dependency Injection - Kodein
- Build system - Gradle
- Communication with Wire Applications JVM SDK
- The app needs Postgres database up & running - we use one in docker-compose.yml, to start it up, you can use
command
make db
. - To run the application execute
make run
or./gradlew run
. - To run the application inside the docker compose environment run
make up
.
For more details see Makefile.
Poll app has public docker image.
quay.io/wire/poll-bot
Tag latest
is the latest release. Releases have then images with corresponding tag, so you
can always roll back. Tag staging
is build from the latest commit in staging
branch.
Configuration is currently being loaded from the environment variables.
/**
* Username for the database.
*/
const val DB_USER = "DB_USER"
/**
* Password for the database.
*/
const val DB_PASSWORD = "DB_PASSWORD"
/**
* URL for the database.
*
* Example:
* `jdbc:postgresql://localhost:5432/app-database`
*/
const val DB_URL = "DB_URL"
Via the system variables - see complete list.
To run app inside docker compose environment with default PostgreSQL database,
please create .env
file in the root directory with the following variables:
# database
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=
# application
DB_USER=
DB_PASSWORD=
DB_URL=
Such configuration can look for example like that:
# database
POSTGRES_USER=wire-poll-app
POSTGRES_PASSWORD=super-secret-wire-pwd
POSTGRES_DB=poll-app
# application
DB_USER=wire-poll-app
DB_PASSWORD=super-secret-wire-pwd
DB_URL=jdbc:postgresql://db:5432/poll-app