Skip to content

PNUdev/shpalta-if

Repository files navigation

Requirements

Application

  • Java 11
  • Maven

Database

  • MySQL (8.0+)

Start locally

mvn clean install
java <env variables: -DvariableName='value'> -jar <jar location>

Start locally for development

mvn compile
mvn <env variables: -DvariableName='value'> spring-boot:run

Environment variables:

  • DB_PASSWORD (default: 'root') - db password
  • DB_URL (default: 'jdbc:mysql://localhost:3306') - db url
  • DB_USERNAME (default: 'root') - db username
  • ADMIN_DEFAULT_USERNAME (default: 'admin') - default admin username
  • ADMIN_DEFAULT_PASSWORD (default: 'admin') - default admin password
  • TELEGRAM_BOT_USERNAME (default: empty) - telegram bot username
  • TELEGRAM_BOT_TOKEN (default: empty) - telegram bot token
  • TELEGRAM_BOT_URL_SECRET (default: empty) - telegram bot webhook url secret
  • TELEGRAM_BOT_WEBHOOK_URL (default: empty) - application base path for telegram webhook
  • APP_BASE_PATH (default: 'http://localhost:8080') - application base path
  • SPRING_PROFILES_ACTIVE - active Spring profiles

Spring profiles:

  • production - run application for production usage (Telegram bot is available)
  • default - run application for local dev (Telegram bot is unavailable, no related env variables are required)
  • test - integration tests

Docker

Local development:

mvn clean install
docker-compose -f docker-compose-dev.yml up

Start standalone instance:

mvn clean install
docker-compose -f docker-compose-prod.yml up