Compare commits
9 Commits
1.0.2
...
22d313a656
Author | SHA1 | Date | |
---|---|---|---|
22d313a656 | |||
737d7f76d4 | |||
cf0e42ff0e | |||
d2fa9bf9ee | |||
fb5a85311c | |||
288d334615 | |||
87f017fc42 | |||
43fb8dcda6 | |||
a3b9c7cdb1 |
38
README.md
38
README.md
@ -3,10 +3,46 @@
|
|||||||
|
|
||||||
Open Source web-based personal expenses tool.
|
Open Source web-based personal expenses tool.
|
||||||
|
|
||||||
|
**Note :** This project does not handle authentication itself. Instead, it relies on OpenID to achieve users authentication.
|
||||||
|
|
||||||
|
## Setup prod env
|
||||||
|
1. Install prerequisites:
|
||||||
|
1. docker
|
||||||
|
2. docker compose
|
||||||
|
3. git
|
||||||
|
|
||||||
|
2. Clone this git repository:
|
||||||
|
```bash
|
||||||
|
git clone https://gitea.communiquons.org/pierre/MoneyMgr
|
||||||
|
cd MoneyMgr/docker_prod
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Copy and adapt env values
|
||||||
|
```bash
|
||||||
|
cp .env.sample .env
|
||||||
|
nano .env
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Create required directories:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p storage/{db,redis-data,redis-conf,minio}
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Start containers
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Checkout http://localhost:8000/
|
||||||
|
|
||||||
|
> The default credentials are `admin` / `admin`
|
||||||
|
|
||||||
## Setup dev env
|
## Setup dev env
|
||||||
1. Install prerequisites:
|
1. Install prerequisites:
|
||||||
1. docker
|
1. docker
|
||||||
2. docker-compose
|
2. docker compose
|
||||||
3. rust
|
3. rust
|
||||||
4. node
|
4. node
|
||||||
|
|
||||||
|
10
docker_prod/.env.sample
Normal file
10
docker_prod/.env.sample
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
MINIO_ROOT_USER=rootuser
|
||||||
|
MINIO_ROOT_PASSWORD=rootpassword
|
||||||
|
DB_USER=db_user
|
||||||
|
DB_PASSWORD=db_password
|
||||||
|
REDIS_PASS=redis_password
|
||||||
|
WEBSITE_ORIGIN=http://localhost:8000
|
||||||
|
APP_SECRET=secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret
|
||||||
|
AUTH_SECRET_KEY=secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret
|
||||||
|
OIDC_CLIENT_ID=bar
|
||||||
|
OIDC_CLIENT_SECRET=foo
|
3
docker_prod/.gitignore
vendored
Normal file
3
docker_prod/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.env
|
||||||
|
storage
|
||||||
|
auth/users.json
|
5
docker_prod/auth/clients.yaml
Normal file
5
docker_prod/auth/clients.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- id: ${OIDC_CLIENT_ID}
|
||||||
|
name: MoneyMgr
|
||||||
|
description: Money management tool
|
||||||
|
secret: ${OIDC_CLIENT_SECRET}
|
||||||
|
redirect_uri: ${APP_ORIGIN}/oidc_cb
|
79
docker_prod/docker-compose.yml
Normal file
79
docker_prod/docker-compose.yml
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
services:
|
||||||
|
minio:
|
||||||
|
image: minio/minio
|
||||||
|
user: "1000"
|
||||||
|
environment:
|
||||||
|
- MINIO_ROOT_USER=$MINIO_ROOT_USER
|
||||||
|
- MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD
|
||||||
|
volumes:
|
||||||
|
- ./storage/minio:/data
|
||||||
|
command: [ "minio", "server", "/data", "--console-address", ":9090" ]
|
||||||
|
ports:
|
||||||
|
- 9000:9000
|
||||||
|
- 9090:9090
|
||||||
|
expose:
|
||||||
|
- 9000
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
user: "1000"
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
expose:
|
||||||
|
- 5432
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=$DB_USER
|
||||||
|
- POSTGRES_PASSWORD=$DB_PASSWORD
|
||||||
|
- POSTGRES_DB=moneymgr
|
||||||
|
volumes:
|
||||||
|
- ./storage/db:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
oidc:
|
||||||
|
image: pierre42100/basic_oidc
|
||||||
|
user: "1000"
|
||||||
|
environment:
|
||||||
|
- LISTEN_ADDRESS=0.0.0.0:9001
|
||||||
|
- STORAGE_PATH=/storage
|
||||||
|
- TOKEN_KEY=$AUTH_SECRET_KEY
|
||||||
|
- WEBSITE_ORIGIN=http://localhost:9001
|
||||||
|
- OIDC_CLIENT_ID=$OIDC_CLIENT_ID
|
||||||
|
- OIDC_CLIENT_SECRET=$OIDC_CLIENT_SECRET
|
||||||
|
- APP_ORIGIN=$WEBSITE_ORIGIN
|
||||||
|
expose:
|
||||||
|
- 9001
|
||||||
|
ports:
|
||||||
|
- 9001:9001
|
||||||
|
volumes:
|
||||||
|
- ./auth:/storage
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
user: "1000"
|
||||||
|
command: redis-server --requirepass ${REDIS_PASS:-secretredis}
|
||||||
|
expose:
|
||||||
|
- 6379
|
||||||
|
volumes:
|
||||||
|
- ./storage/redis-data:/data
|
||||||
|
- ./storage/redis-conf:/usr/local/etc/redis/redis.conf
|
||||||
|
|
||||||
|
moneymgr:
|
||||||
|
image: pierre42100/moneymgr_backend
|
||||||
|
user: "1000"
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
|
environment:
|
||||||
|
- WEBSITE_ORIGIN=${WEBSITE_ORIGIN}
|
||||||
|
- SECRET=${APP_SECRET}
|
||||||
|
- DB_HOST=db
|
||||||
|
- DB_USERNAME=$DB_USER
|
||||||
|
- DB_PASSWORD=$DB_PASSWORD
|
||||||
|
- DB_NAME=moneymgr
|
||||||
|
- OIDC_CONFIGURATION_URL=http://oidc:9001/.well-known/openid-configuration
|
||||||
|
- OIDC_PROVIDER_NAME=OIDC
|
||||||
|
- OIDC_CLIENT_ID=$OIDC_CLIENT_ID
|
||||||
|
- OIDC_CLIENT_SECRET=$OIDC_CLIENT_SECRET
|
||||||
|
- S3_ENDPOINT=http://minio:9000
|
||||||
|
- S3_ACCESS_KEY=$MINIO_ROOT_USER
|
||||||
|
- S3_SECRET_KEY=$MINIO_ROOT_PASSWORD
|
||||||
|
- REDIS_HOSTNAME=redis
|
||||||
|
- REDIS_PASSWORD=${REDIS_PASS:-secretredis}
|
@ -27,7 +27,7 @@ light-openid = "1.0.4"
|
|||||||
rand = "0.9.1"
|
rand = "0.9.1"
|
||||||
ipnet = { version = "2.11.0", features = ["serde"] }
|
ipnet = { version = "2.11.0", features = ["serde"] }
|
||||||
lazy-regex = "3.4.1"
|
lazy-regex = "3.4.1"
|
||||||
jwt-simple = { version = "0.12.11", default-features = false, features = ["pure-rust"] }
|
jwt-simple = { version = "0.12.12", default-features = false, features = ["pure-rust"] }
|
||||||
mime_guess = "2.0.5"
|
mime_guess = "2.0.5"
|
||||||
rust-embed = { version = "8.7.2" }
|
rust-embed = { version = "8.7.2" }
|
||||||
sha2 = "0.11.0-pre.5"
|
sha2 = "0.11.0-pre.5"
|
||||||
|
@ -14,7 +14,7 @@ use std::process::Command;
|
|||||||
struct Args {
|
struct Args {
|
||||||
/// URL to Money manager API
|
/// URL to Money manager API
|
||||||
#[arg(short('U'), long, env, default_value = "http://localhost:8000/api")]
|
#[arg(short('U'), long, env, default_value = "http://localhost:8000/api")]
|
||||||
matrix_gw_url: String,
|
moneymgr_url: String,
|
||||||
|
|
||||||
/// Token ID
|
/// Token ID
|
||||||
#[arg(short('i'), long, env)]
|
#[arg(short('i'), long, env)]
|
||||||
@ -39,7 +39,8 @@ struct Args {
|
|||||||
fn main() {
|
fn main() {
|
||||||
let args: Args = Args::parse();
|
let args: Args = Args::parse();
|
||||||
|
|
||||||
let full_url = format!("{}{}", args.matrix_gw_url, args.uri);
|
let full_url = format!("{}{}", args.moneymgr_url, args.uri);
|
||||||
|
|
||||||
log::debug!("Full URL: {full_url}");
|
log::debug!("Full URL: {full_url}");
|
||||||
|
|
||||||
let key = HS256Key::from_bytes(args.token_secret.as_bytes());
|
let key = HS256Key::from_bytes(args.token_secret.as_bytes());
|
||||||
|
1020
moneymgr_web/package-lock.json
generated
1020
moneymgr_web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
|||||||
"@mdi/react": "^1.6.1",
|
"@mdi/react": "^1.6.1",
|
||||||
"@mui/icons-material": "^7.1.0",
|
"@mui/icons-material": "^7.1.0",
|
||||||
"@mui/material": "^7.1.0",
|
"@mui/material": "^7.1.0",
|
||||||
"@mui/x-charts": "^8.3.1",
|
"@mui/x-charts": "^8.4.0",
|
||||||
"@mui/x-data-grid": "^8.3.1",
|
"@mui/x-data-grid": "^8.3.1",
|
||||||
"@mui/x-date-pickers": "^8.3.1",
|
"@mui/x-date-pickers": "^8.3.1",
|
||||||
"date-and-time": "^3.6.0",
|
"date-and-time": "^3.6.0",
|
||||||
@ -29,14 +29,14 @@
|
|||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"react-router": "^7.6.0",
|
"react-router": "^7.6.0",
|
||||||
"react-router-dom": "^7.6.0",
|
"react-router-dom": "^7.6.0",
|
||||||
"ts-pattern": "^5.7.0"
|
"ts-pattern": "^5.7.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.26.0",
|
"@eslint/js": "^9.27.0",
|
||||||
"@types/react": "^19.1.4",
|
"@types/react": "^19.1.5",
|
||||||
"@types/react-dom": "^19.1.5",
|
"@types/react-dom": "^19.1.5",
|
||||||
"@vitejs/plugin-react": "^4.4.1",
|
"@vitejs/plugin-react": "^4.4.1",
|
||||||
"eslint": "^9.26.0",
|
"eslint": "^9.27.0",
|
||||||
"eslint-plugin-react-dom": "^1.49.0",
|
"eslint-plugin-react-dom": "^1.49.0",
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
"eslint-plugin-react-refresh": "^00.4.20",
|
"eslint-plugin-react-refresh": "^00.4.20",
|
||||||
|
Reference in New Issue
Block a user