You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Samuel Pua 7cf10b07d4 Feat(ktm-booking): Initial commit 3 years ago
_docker_mnt Feat(ktm-booking): Initial commit 3 years ago
backend Feat(ktm-booking): Initial commit 3 years ago
docker Feat(ktm-booking): Initial commit 3 years ago
scripts Feat(ktm-booking): Initial commit 3 years ago
.dockerignore Feat(ktm-booking): Initial commit 3 years ago
.env.example Feat(ktm-booking): Initial commit 3 years ago
.gitignore Feat(ktm-booking): Initial commit 3 years ago
Jenkinsfile Feat(ktm-booking): Initial commit 3 years ago
README.md Feat(ktm-booking): Initial commit 3 years ago
docker-compose.yml Feat(ktm-booking): Initial commit 3 years ago

README.md

KTM Booking Bot

About

The project's goal is build bot to book KTM train ticket (Restricted to 1 booking per day)

Deployment

The project uses the following environment variables:

  • ENVIRONMENT
  • DB_HOST
  • DB_PORT
  • DB_USER
  • DB_PASS
  • DB_NAME
  • DB_SSL
  • COOKIE_STRING
  • ALLOW_REGISTRATION
  • LOGGER_WEBHOOK_URL

The following environment variables are used for testing

  • TEST_DB_HOST
  • TEST_DB_PORT
  • TEST_DB_USER
  • TEST_DB_PASS
  • TEST_DB_NAME
  • TEST_DB_SSL

The application may be deployed using the deployment script at scripts/deploy.sh.

Build

The build script is available at scripts/build.sh. .env is required to be populated. The example .env is available at .env.example.

Run

The application may be staged and run using docker-compose. The following command may be used:

docker-compose up --build -d

Development

The development postgres server can be launched using the script at scripts/dev_postgres_docker.sh.

Testing

Testing is enabled through go test. The following command may be used to conduct testing:

go test -cover ./...

Disclaimer

This application is built for educational purpose only. Users who use this application is assumed to be knowledgable and aware of what the application does technically. The author does not bear any liability due to the execution of this application.