Feat(ktm-booking): Initial commit
Some checks failed
ktm-booking-bot/ktm-booking-bot/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2022-09-27 02:50:07 +08:00
commit 7cf10b07d4
44 changed files with 4569 additions and 0 deletions

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
# 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.