https://github.com/active-group/frobese-2022-accounts
https://github.com/active-group/frobese-2022-accounts
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/active-group/frobese-2022-accounts
- Owner: active-group
- License: apache-2.0
- Created: 2022-06-28T13:55:20.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-30T13:20:54.000Z (almost 3 years ago)
- Last Synced: 2023-08-01T02:40:03.839Z (over 1 year ago)
- Language: Erlang
- Size: 21.5 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Account Service
Service to create bank accounts.
## Build
```
$ rebar3 compile
```## Run locally using rebar shell
The service can be run locally including a REPL using
```
$ rebar3 shell
```The web-frontend is served at http://localhost:8000/accounts
## Run locally using docker
This project comes with a docker container. It is built using
```
docker build . -t accounts
```in the root directory of the project. To run the docker container call
```
docker run -p 8000:8000 -e "RELX_REPLACE_OS_VARS=true" -e "NODE_NAME=any_name" accounts
```
Running with docker we are able to configure the node name of the erlang node
using the `NODE_NAME` env var. To do so, relx must be informed that the
vm.args file contains env vars via `RELX_REPLACE_OS_VARS`.
If the docker container is up and running, the web-frontend can be found at
http://localhost:8000/accounts## Testing
rebar3 & eunit are used for testing. To test the service use
```
rebar3 eunit
```To test it within the docker container use
```
docker run accounts test
```## Release
A release can be built using
```
rebar3 release
```