Skip to content

Commit 4994b9d

Browse files
committed
live-demo: add example environment configuration and update .gitignore for local setup
1 parent c638f7e commit 4994b9d

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎live-demo/app/.env.example‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Local env of the live demo: `pnpm dev` copies this file to the gitignored .env when it does not exist yet.
2+
# Production does not use it, it gets its env from the vault (see ../deploy/compose.yml).
3+
ADMINFORTH_SECRET=local-dev-secret
4+
NODE_ENV=development
5+
DATABASE_FILE_URL=file:.db.sqlite
6+
# password of the local superadmin admin1@adminfoth.dev
7+
ADMIN_PASSWORD=admin
8+
9+
# Required: the AI plugins refuse to start without it. Take it from the vault.
10+
OPENAI_API_KEY=
11+
# Optional: only image upload to the demo-static.adminforth.dev bucket needs them.
12+
AWS_ACCESS_KEY_ID=
13+
AWS_SECRET_ACCESS_KEY=

‎live-demo/app/.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
db
2-
.env
2+
.env
3+
*.sqlite*

‎live-demo/app/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"node": "^22.12.0 || ^24.0.0 || ^26.0.0"
88
},
99
"scripts": {
10+
"dev": "pnpm setup-live-demo && pnpm start",
11+
"setup-live-demo": "[ -f .env ] || (cp .env.example .env && echo 'Created .env from .env.example, put OPENAI_API_KEY into it and run again' && exit 1) && pnpm install && pnpm migrate",
1012
"start": "tsx --env-file=.env --watch index.ts",
1113
"test": "echo \"Error: no test specified\" && exit 1",
1214
"bundleNow": "tsx bundleNow.ts",

0 commit comments

Comments
 (0)