direnv allowpnpm idrizzle-kit pushto run db migrations
- Create a file
.envin the root of the repo with the following content:
# Local DB url
DB_URL=data.sqlite
# Local
OTLP_URL=http://localhost:4318/v1/traces
# Auth not needed for local
# OTLP_AUTH="Basic XXX"nix runto get Grafana/Tempo running locally- Run the project (dev or preview)
- Click on the "Get Started" button (will take about 15 sec the first time) and add some members.
- See traces under http://localhost:4000/explore
- Login with "admin/admin"
pnpm dev- Open http://localhost:3000
pnpm test # Run once
pnpm test:w # Watch modepnpm test:e2e # Run e2e tests (dev mode)
pnpm test:e2e:ci # Run e2e tests (production mode)See e2e/README.md for more details.
Run the complete CI pipeline locally:
pnpm build:ciThis runs (via scripts/ci.sh):
- Type checking
- Unit tests
- Production build
- Database seeding for e2e tests
- E2E tests against production build
The CI script automatically:
- Sets all required environment variables (
DB_URL,OTLP_URL,CI,E2E_GROUP_TEST_ID) - Seeds the database with test data
- Runs e2e tests against the production server
Note: In CI mode, environment variables are exported directly by the shell script - no .test-env.json file is created.
Script that is run on the server to backup the db:
sqlite3 db/data.sqlite ".backup 'db/backups/backup_$(date +\%Y-%m-%d_%H-%M-%S).sqlite'" && mc mirror db/backups infomaniak/default/groupli/backupConfigure rclone to connect to Infomaniak Swiss Backup 04 (S3):
rclone config- Choose
nfor new remote - Name it
infomaniak-backup - Choose
s3for Amazon S3 Compliant Storage Providers - Choose
Otherfor S3 provider - Choose
1for AWS credentials in the next step (env or IAM) - Enter your Access Key ID
- Enter your Secret Access Key
- Leave region blank (press Enter)
- Enter endpoint:
https://s3.swiss-backup04.infomaniak.com - Leave location constraint blank (press Enter)
- Leave ACL blank (press Enter)
- Accept defaults for remaining options
- Choose
yto confirm and save
To mount and access the Infomaniak backup storage:
./mount-infomaniak-backup-s3.shThe backups will be accessible at ./infomaniak/groupli/backup/. Press Ctrl+C to unmount when done.