Skip to content

A bot which uses Spotify API, Genius API and a messenger platform API to send you lyrics of the song which is currently playing.

Notifications You must be signed in to change notification settings

vasyagladush/spotify-lyrics-telegram-bot

Repository files navigation

spotify-messenger-bot

A bot which uses Spotify API, Genius API and a messenger platform API to send you the text of a song which is currently being played.

The app can be run by just Spring Boot Run command or in app and database Docker containers (different environment variables and run commands, see below and .env.* files)

Prerequirements

  • Java
  • Docker
  • Maven (not really needed as the Maven wrapper is in this repo: /.mvn, can be used with a command: ./mvnw)

DB Migrations

DB migrations are run automatically by Flyway everytime the app is started. The strict naming should be followed: V{version_number}__clear-migration-name Examples:

  • V0__create-public-schema
  • V1_0__create-user-table

Most Used Commands

  • This command exports your vars from .env file to your OS's environment variables: export $(xargs <.env): use in case SpringBoot doesn't read your .env file properly
  • Spring Boot Run (properties are configured so this way Docker containers are not being set up): ./mvnw spring-boot:run
  • rebuild image and run Docker compose: docker-compose up --build
  • rebuild image and run Docker compose in background: docker-compose up --build -d (use this to run the containers with app and DB)
  • stop Docker compose containers: docker-compose down (use this to stop the app and DB containers)

Sprint Start Config

All Commands

  • This command exports your vars from .env file to your OS's environment variables: export $(xargs <.env): use in case SpringBoot doesn't read your .env file properly (most used)
  • Spring Boot Run (propertoes are configures so thisw way Docker containers are not being set up): ./mvnw spring-boot:run
  • Maven package (skipping tests): ./mvnw clean package -DskipTests
  • Maven install (skipping tests): ./mvnw clean install -DskipTests (used in Dockerfile)
  • run Docker compose: docker-compose up
  • build/rebuild Docker image: docker-compose build
  • rebuild image and run Docker compose: docker-compose up --build (most used)
  • rebuild image and run Docker compose in background: docker-compose up --build -d (use this to run the containers with app and DB) (most used)
  • run Docker compose and run containers in background: docker-compose up -d
  • force recreate Docker image, build and run Docker compose: docker-compose up --force-recreate --build -d
  • stop Docker compose containers: docker-compose down (use this to stop the app and DB containers) (most used)
  • restart Docker compose containers: docker-compose restart
  • pring Docker compose config (can be used to see if environment variables are used properly): docker-compose config

Sources:

About

A bot which uses Spotify API, Genius API and a messenger platform API to send you lyrics of the song which is currently playing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published