Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 97fedb0

Browse files
authored
Update README.md
1 parent 753de38 commit 97fedb0

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
> Member Management Service
44
5+
[![GitHub Release](https://img.shields.io/github/v/release/int-i/integer?logo=github&logoColor=white&style=for-the-badge)](https://github.com/int-i/integer/releases/)
56
[![Rust](https://img.shields.io/badge/rust-2018-black.svg?logo=rust&logoColor=white&style=for-the-badge)](https://doc.rust-lang.org/edition-guide/rust-2018/index.html)
67
[![Rocket](https://img.shields.io/badge/rocket-0.5.0-d33847.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02My41NjMgMjkuMjU0YzAgMS40NDQuMzY3IDIuNzI1IDEuMSAzLjc5M0w2Mi4xIDM1LjYxNWMtLjI3Mi4yOTQtLjA3Mi40OTcuMjE2Ljc4NmwyLjAxMiAyLjAwM2MuMjc3LjI5NC40NjUuNDc1Ljc0OC4xODdsMi43OC0yLjc3OGMuNjI0LjIyOSAyLjEyMS42MjggNC4zODUuMjk2bDEuNzQtMS4zMTFjLjEzLS4wOTkuMzU3LS4yNDUuNTA3LS4zMjdsMS41NjMtLjg1NS0xLjI1MyAxLjI2NmMtLjEyLjEyMS0uMzI0LjMtLjQ1My4zOThsLTEuNDk2IDEuMTI3IDIuNTUgNi45NzdhLjQ1LjQ1IDAgMCAwIC43MzUuMTcxbDUuOTg1LTUuNjkzYS40NTUuNDU1IDAgMCAwIC4xMzQtLjI0OGwxLjM0Mi03LjQ5OWMxLjYzMi0xLjQxMSAzLjI4NC0zLjA1MyA0LjkxMy00Ljg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MjcgOTQuMzg4YS44MTcuODE3IDAgMCAxLTEuMTUyIDBMLjMgOTMuODE2YS44MTMuODEzIDAgMCAxIDAtMS4xNWw1Mi45ODMtNTIuOTFhLjgxNS44MTUgMCAwIDEgMS4xNTIgMGwuNTc0LjU3M2EuODEzLjgxMyAwIDAgMSAwIDEuMTVMMi4wMjcgOTQuMzl6Ii8+PC9zdmc+&style=for-the-badge)](https://rocket.rs/)
78
[![PostgreSQL](https://img.shields.io/badge/postgres-13-4169e1.svg?logo=postgresql&logoColor=white&style=for-the-badge)](https://www.postgresql.org/docs/13/index.html)
@@ -48,6 +49,7 @@
4849
### Requirement
4950

5051
- [Docker](https://www.docker.com/)
52+
- `db/password.txt` - a DB password file
5153
- `cert.pem` - a certificate
5254
- `key.pem` - a private key
5355

@@ -59,13 +61,19 @@
5961
$ docker build -t integer_api .
6062
```
6163

62-
2. Create a Docker secret for `site.pem`:
64+
2. Create a Docker secret for `postgres_password`:
65+
66+
```bash
67+
$ docker secret create postgres_password db/password.txt
68+
```
69+
70+
3. Create a Docker secret for `site.pem`:
6371

6472
```bash
6573
$ cat cert.pem key.pem | docker secret create site.pem -
6674
```
6775

68-
3. Deploy the application to Docker Swarm
76+
4. Deploy the application to Docker Swarm:
6977

7078
```bash
7179
$ docker swarm init
@@ -78,34 +86,44 @@
7886

7987
#### GET /members/{id}
8088

81-
회원 정보 조회
89+
Fetch member public information by the given member id.
8290

8391
##### Output
8492

8593
```json
8694
{
8795
"id": 12191765,
88-
"name": "박승재",
96+
"name": "inti",
8997
"admission_year": 19
9098
}
9199
```
92100

93101
#### GET /members/{id}/contacts
94102

95-
회원 연락처 정보 조회
103+
Fetch member contacts by the given member id.
96104

97105
##### Output
98106

99107
```json
100108
{
101109
"id": 12191234,
102-
"name": "박승재",
110+
"name": "inti",
103111
"admission_year": 19,
104112
"phone": "010-1234-5678",
105113
"email": "[email protected]"
106114
}
107115
```
108116

117+
### Environment Variables
118+
119+
- `DB_HOST` (optional, default: `localhost`)
120+
- `DB_NAME` (optional, default: `integer`)
121+
- `DB_USER` (required)
122+
- `DB_PASSWORD` (optional)
123+
- `DB_PASSWORD_FILE` (optional)
124+
125+
Note: Integer requires either `DB_PASSWORD` or `DB_PASSWORD_FILE` to be set.
126+
109127
## License
110128

111129
```text

0 commit comments

Comments
 (0)