The repository with source code of TimeMates server on Kotlin.
Warning
The current backend version may lack stability in the API and migration support. It's not production ready.
If you want to host the application yourself, follow the instructions below:
- Obtain the latest release by either building the artifact with ShadowJar or downloading it from the releases page.
- Install Java on your system.
- Set up the environment variables as described in the Environment section (optional).
- Run the application using the following command:
java -jar <path-to-jar-file>
To run this application on your own host, you need to provide the following environment variables:
timemates_rsocket_port
– The port on which the rsocket instance will run (default:8080
)timemates_database_url
– The URL to the PostgreSQL databasetimemates_database_user
– The username for the PostgreSQL databasetimemates_database_password
– The password for the PostgreSQL usermailersend_api_key
– MailerSend API keymailersend_sender
– MailerSend sendermailersend_confirmation_template
– MailerSend template for authentication confirmationmailersend_support_email
– Support email for MailerSendtimemates_timers_cache_size
– Cache size for timers (default:100
)timemates_users_cache_size
– Cache size for users (default:100
)timemates_auth_cache_size
– Cache size for authentication entities (default:100
)timemates_auth_cache_alive
– Maximum alive time for authentication cache in seconds (default:300
seconds, or 5 minutes)timemates_debug
– Enable debug mode (present or not, acts as a flag)
Note
You can also use Java arguments to set up the application. Refer to the source code for more information.
The Timemates Backend Docker image is available on Docker Hub. You can pull the image and run it locally or deploy it to your server.
To pull the Docker image from Docker Hub, use the following command:
docker pull y9vad9/timemates-backend:$version
docker run --env-file .env y9vad9/timemates-backend:$version
Replace $version
with the specific version or tag you want to use.
For example, to pull the latest version, use:
docker pull y9vad9/timemates-backend:latest
docker run --env-file .env y9vad9/timemates-backend:$version
You should also provide DOCKER_IMAGE_PORT
environment variable for docker port. Also,
you should add all environment variables from Environment.
Backend creates and migrates Postgresql database by itself (if it's release version), so that no need in your own setup or migration.