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 rsocket instance will run (default:8080
)TIMEMATES_DATABASE_URL
– The URL to the PostgreSQL databaseTIMEMATES_DATABASE_USER
– The username for the PostgreSQL databaseTIMEMATES_DATABASE_USER_PASSWORD
– The password for the PostgreSQL userTIMEMATES_FILES_PATH
– The path to the directory where uploaded files will be storedTIMEMATES_SMTP_HOST
– The SMTP host of the mailerTIMEMATES_SMTP_PORT
– The SMTP port of the mailerTIMEMATES_SMTP_USER
– The SMTP user of the mailerTIMEMATES_SMTP_USER_PASSWORD
– The password for the SMTP userTIMEMATES_SMTP_SENDER
– The email address of the SMTP mailer
Note
There are two mailer implementations available: SMTP and MailerSend. Depending on your choice, you need to provide the corresponding environment variables.If using the SMTP mailer implementation, make sure to set the
TIMEMATES_SMTP_HOST
,TIMEMATES_SMTP_PORT
,TIMEMATES_SMTP_USER
,TIMEMATES_SMTP_USER_PASSWORD
andTIMEMATES_SMTP_SENDER
variables.If using the MailerSend implementation, you should set the
MAILERSEND_API_KEY
,MAILERSEND_SENDER
,MAILERSEND_CONFIRMATION_TEMPLATE
andMAILERSEND_SUPPORT_EMAIL
variables.Refer to the code documentation for more details on configuring the mailer implementation.
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.