From f85f2057c67a35f05832be739e411c67ba913b1e Mon Sep 17 00:00:00 2001 From: William Brawner Date: Sat, 2 Oct 2021 14:38:13 -0600 Subject: [PATCH] Update README --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b92eb18..fa31459 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,36 @@ # Twigs Server -This is the backend application that powers the [Android](https://github.com/wbrawner/twigs-android), [iOS](https://github.com/wbrawner/twigs-ios), and [web](https://github.com/wbrawner/twigs-web) applications for Twigs, a personal finance/budgeting app. +This is the backend application that powers the [Android](https://git.wbrawner.com/twigs-android), [iOS](https://git.wbrawner.com/twigs-ios), and [web](https://git.wbrawner.com/twigs-web) applications for Twigs, a personal finance/budgeting app. None of these apps are complete, so expect bugs, and they are all in various stages of development, so expect some feature disparity between platforms. ## Prerequisites - JDK 14 or newer -- MySQL 5.7 or newer +- PostgreSQL 13 or newer - (optional) Docker ## Running -Prior to running the app, make sure you have a MySQL server running, with a database and user ready to go. To avoid the hassle of figuring out how to get it installed locally, using Docker is recommended, and a sample `docker-compose.yml` file is included in the root of the repository. If you already have a MySQL server running, you can run the app from the command line with gradle: +Prior to running the app, make sure you have a PostgreSQL server running, with a database and user ready to go. To avoid the hassle of figuring out how to get it installed locally, using Docker is recommended, and a sample `docker-compose.yml` file is included in the root of the repository. If you already have a PostgreSQL server running, you can run the app from the command line with gradle: - ./gradlew bootRun + ./gradlew run -By default, twigs will try to connect to the `budget` database on `localhost`, using `budget` as the user and password. To change these values, you can modify the `api/src/main/resources/application.properties` file (but don't commit it!), or better yet, set the appropriate environment variables using the uppercase names and replacing the `.`s with `_`s. For example, to change the `spring.datasource.username` property (the database username), you could set the value in an environment variable called `SPRING_DATASOURCE_USERNAME`. +## Configuration + +Some parameters of Twigs can be configured via environment variables: + +Environment Variable|Default Value|Note +:---:|:---:|:--- +`TWIGS_PORT`|`8080`|Port for web server to listen on +`TWIGS_DB_HOST`|`localhost`|PostgreSQL server host +`TWIGS_DB_PORT`|`5432`|PostgreSQL server port +`TWIGS_DB_NAME`|`twigs`|PostgreSQL database name +`TWIGS_DB_USER`|`twigs`|PostgreSQL database user +`TWIGS_DB_PASS`|`twigs`|PostgreSQL database password +`TWIGS_PW_SALT`||Salt to use for password, generated if empty or null ## Building Building the app is also handled with gradle: - ./gradlew bootJar + ./gradlew shadowJar