Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add section for user creation
  • Loading branch information
MrFired authored Sep 25, 2024
1 parent 51c1fce commit 0dc3815
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

### Installation & Configuration

1. Download the release archive and extract it to the chosen work directory on the host. In total, there should be 5 files:
1. Download the release archive and extract it to the chosen working directory on the host. In total, there should be 5 files:

- `app.jar`, the app itself;
- `docker-compose.yml`, the Compose file that defines and configures containers;
Expand All @@ -25,4 +25,15 @@
- `AWS_ACCESS_KEY_ID_FILE`, `AWS_SECRET_ACCESS_KEY_FILE` and `DB_PASSWORD_FILE` to be the path to the plaintext files on the host containing the cloud keys and database password, respectively.
- (Optional) Change other fields accordingly if you want to store the app file, NGINX config or DB init script somewhere else

3. Run `docker compose up` to start the service
3. Run `docker compose up` in the working directory to start the service

Right now, the service should be up. However, there is no way to login yet, because there are no users registered. New users have to be added to the database manually. Perhaps in the future a more convinient way will be implemented.
To register a new test user:

1. From working directory, enter the database container with `docker exec -it imagetransfer-db-1 psql -U postgres`
2. Add a new user with SQL query `insert into users values (0, '$2a$10$wCqqqVNMe8oR2IY.6HHAJumTwP4W.uZPbL04wW45qxkDWGVH1ICr2', 'test_user');`

- `0` is the unique user id;
- `$2a$10$wCqqqVNMe8oR2IY.6HHAJumTwP4W.uZPbL04wW45qxkDWGVH1ICr2` is the user password hashed with BCrypt. For testing purposes, you can use this hash that is equivalent to `1234` password;
- `test_user` is the username.

0 comments on commit 0dc3815

Please sign in to comment.