Skip to content

Commit

Permalink
chore: update readme and compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Nov 25, 2024
1 parent 21453f6 commit 9da0dc8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 25 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,33 @@ SlimFact streamlines your invoicing process, ensuring accuracy, security, and co
## Documentation
[Invoice status flowchart](./packages/docs/Flowchart.md)

## Self hosted
## Self hosted
```sh
wget https://raw.githubusercontent.com/simsustech/slimfact/main/docker-compose.yaml
wget https://raw.githubusercontent.com/simsustech/slimfact/main/.env.example -O .env
mkdir env
nano -L .env # Change environment
nano -L env/POSTGRES_PASSWORD # Enter postgress password
nano -L env/OTP_SECRET # Enter OTP secret, use openssl rand -base64 32
nano -L env/OIDC_COOKIES_KEYS # Enter OIDC cookies keys, use openssl rand -base64 32, comma separated
docker compose up
```

## Developers
SlimFact is built on top of [Modular API](https://www.simsus.tech/modularapi). You will need an account for private NPM access.

```
git clone https://github.com/simsustech/slimfact.git
cd slimfact
pnpm i
docker compose -f docker-compose.dev.yaml up
cd packages/api
POSTGRES_PASSWORD=ufgouifdgjdfg POSTGRES_DB=slimfact pnpm run migrate:latest
POSTGRES_PASSWORD=ufgouifdgjdfg POSTGRES_DB=slimfact pnpm run seed:fake
pnpm run dev
```

## License
Copyright © simsustech 2024-present

Expand Down
30 changes: 5 additions & 25 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
services:
api:
image: "ghcr.io/simsustech/slimfact"
build:
context: .
secrets:
- POSTGRES_PASSWORD
- OTP_SECRET
- SIMSUSTECH_NPM_TOKEN
dockerfile: Dockerfile
target: api
# args:
# App env variables
# - VITE_API_HOSTNAME=${HOSTNAME}
# - VITE_API_HOSTNAME=vitrify.local
# - VITE_OIDC_ISSUER=https://${HOSTNAME}/oidc
# - VITE_OIDC_CLIENT_ID=${OIDC_CLIENT_ID}
# - VITE_OIDC_REDIRECT_URI=https://${HOSTNAME}/redirect
# - VITE_OIDC_EMAIL_CHANGE_URI=https://${HOSTNAME}/interaction/email/change
# - VITE_OIDC_EMAIL_VERIFY_URI=https://${HOSTNAME}/interaction/email/verify
# - VITE_OIDC_PASSWORD_CHANGE_URI=https://${HOSTNAME}/interaction/password/change
# - VITE_TITLE=Modularapi
# - VITE_LANG=nl
image: "ghcr.io/simsustech/slimfact:latest"
labels:
caddy: ${HOSTNAME}
caddy.reverse_proxy: "{{upstreams 80}}"
Expand All @@ -37,7 +17,7 @@ services:
MAIL_USER: ${MAIL_USER}
MAIL_PASS: ${MAIL_PASS}
LICENSE_KEY: ${LICENSE_KEY}
OIDC_COOKIES_KEYS: # openssl rand -base64 32
OIDC_COOKIES_KEYS: /run/secrets/OIDC_COOKIES_KEYS
OTP_SECRET_FILE: /run/secrets/OTP_SECRET
OTP_VALIDITY_SECONDS: 3600
EMAIL_FOOTER: "Footer"
Expand All @@ -48,8 +28,8 @@ services:
# entrypoint: ["/bin/sh", "-c", "tail -f /dev/null"]
secrets:
- POSTGRES_PASSWORD
- SIMSUSTECH_NPM_TOKEN
- OTP_SECRET
- OIDC_COOKIES_KEYS
networks:
web:
slimfact:
Expand All @@ -75,10 +55,10 @@ services:
secrets:
POSTGRES_PASSWORD:
file: ./env/POSTGRES_PASSWORD
SIMSUSTECH_NPM_TOKEN:
file: ./env/SIMSUSTECH_NPM_TOKEN
OTP_SECRET:
file: ./env/OTP_SECRET
OIDC_COOKIES_KEYS:
file: ./env/OIDC_COOKIES_KEYS

networks:
slimfact:
Expand Down
1 change: 1 addition & 0 deletions env example/OIDC_COOKIES_KEYS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# openssl rand -base64 32, comma separated

0 comments on commit 9da0dc8

Please sign in to comment.