Skip to content

Commit dd5d5f5

Browse files
committed
Update documentation
1 parent f6fe773 commit dd5d5f5

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/build/
77
AuthGenHash/bin
88
setenv.sh
9+
/UnityAuth/bin/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ compose_ui:
88

99
compose_all:
1010
docker network create unity-network > /dev/null 2>&1 || true
11-
docker compose -f ./docker-compose.local.yml up
11+
docker compose -f ./docker-compose.local.yml up

README.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,58 @@
11
# UnityAuth
22

3-
UnityAuth is a comprehensive authentication and authorization service built with modern microservices architecture. It provides JWT-based authentication, user management, and a web-based administration interface.
3+
UnityAuth is a comprehensive authentication and authorization service built with modern
4+
microservices architecture. It provides JWT-based authentication, user management, and
5+
a web-based administration interface.
6+
7+
## QuickStart
8+
9+
### Local Environment
10+
From the project root, copy `setenv.sh.example` into `setenv.sh` and update the correct
11+
environment variable values.
12+
* If used together with Libre311 project
13+
(https://github.com/UnityFoundation-io/Libre311.git), `LIBRE311_UI_BASE_URL` must be updated
14+
to base URL of Libre311 UI.
15+
* If use a local database, also update the `DATASOURCES_DEFAULT_*` environment variables
16+
for the corresponding database.
17+
18+
Run the UnityAuth API with:
19+
```shell
20+
source setenv.sh
21+
cd UnityAuth
22+
./gradlew run
23+
```
424

5-
## Local Development QuickStart
25+
Run the UnityAuth UI in another terminal windows:
26+
```shell
27+
source setenv.sh
28+
cd frontend
29+
npm install
30+
npm run dev
31+
```
632

33+
### Docker Environment
734
To launch the auth service, you can use the docker compose from the project root:
835

936
```sh
1037
docker compose -f docker-compose.local.yml up
1138
```
1239

13-
This will start:
40+
This will start containers for the UnityAuth API, UI and database server with service
41+
names `unity-auth-api`, `unity-auth-ui`, and `unity-auth-db`, respectively.
1442

15-
- **UnityAuth API** on http://localhost:8081 (or http://unity-auth-api:8081)
16-
- **UnityAuth UI** on http://localhost:3001 (or http://unity-auth-ui:3001)
17-
- **MySQL Database** for data persistence
43+
- **UnityAuth API** on http://localhost:9090 (inside Docker http://unity-auth-api:9090)
44+
- **UnityAuth UI** on http://localhost:3001 (inside Docker http://unity-auth-ui:3000)
45+
- **MySQL Database** is open on port `13306` in `localhost` (within Docker is port `3306`
46+
with host name `unity-auth-db`)
1847

19-
### Hosts File Updates
48+
#### Hosts File Updates
2049

21-
For consistent internal-external service name resolution, add these to your `/etc/hosts` file
50+
When using Docker environment, add these to your `/etc/hosts` file
51+
for consistent internal-external service name resolution:
2252

2353
```txt
2454
127.0.0.1 unity-auth-api
2555
127.0.0.1 unity-auth-ui
26-
127.0.0.1 libre311-api
27-
127.0.0.1 libre311-ui
2856
```
2957

3058
You can log in with these accounts.

0 commit comments

Comments
 (0)