Personal finance management API.
The easiest way to run the app is to run it in Docker (provide environment variables as needed):
docker run -p 8080:8080 \
-e 'DB_HOST=postgres' \
-e 'DB_PASSWORD=postgres-password' \
-e 'AUTH_OPENID_CONFIGURATION_URL=https://accounts.google.com/.well-known/openid-configuration' \
ashesss/mah-moneh:latest
Or even with docker compose, where you can configure the environment in docker-compose.override.yml
(see example), then simply run:
docker-compose up
The configuration is done via environment variables.
PORT
- the port to run the web server on, default: 8080
The API handles authentication using JWT tokens. The token is passed in the Authorization
header as a bearer token. It is possible to use OIDC service like Auth0 to obtain the token and then use it with this API. It is required to provide the app with the URL to the OIDC discovery documents in the AUTH_OPENID_CONFIGURATION_URL
environment variable.
The API uses PostgreSQL database. The connection must be with following environment variables:
DB_HOST
- the hostname of the database server, default: localhostDB_PORT
- the port of the database server, default: 5432DB_NAME
- the name of the database, default: postgresDB_USER
- database user, default: postgresDB_PASSWORD
- database user's password, requiredDB_DEBUG
- whether to use the database in debug mode
To configure CORS to allow access from a specific domain, set the CORS_ALLOWED_ORIGINS
environment variable to semicolon-separated list of allowed URLs,
for example CORS_ALLOWED_ORIGINS=http://localhost:5000;http://example.com
.