imisa2 commited on
Commit
bcfe349
·
verified ·
1 Parent(s): ba4b596

Deploy Attendwise teacher pilot from eb71b15

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -2
  2. README.md +27 -6
Dockerfile CHANGED
@@ -1,2 +1,16 @@
1
- FROM huggingface/autotrain-advanced:latest
2
- CMD uvicorn autotrain.app:app --host 0.0.0.0 --port 7860 --reload --workers 4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:24-bookworm-slim
2
+ ARG SOURCE_REV=eb71b15c9c26911909ea1bfbebb981b9c5b04011
3
+ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl python3 make g++ \
4
+ && rm -rf /var/lib/apt/lists/*
5
+ WORKDIR /app
6
+ # Pin SOURCE_REV to a reviewed, pushed commit; no credentials or runtime data
7
+ # enter the image or the public Space repository.
8
+ RUN test -n "$SOURCE_REV" \
9
+ && curl -fsSL "https://codeload.github.com/imisa2/bluetooth-attendance/tar.gz/$SOURCE_REV" \
10
+ | tar -xz --strip-components=1 -C /app
11
+ WORKDIR /app/backend
12
+ RUN npm ci && npm run check && chown -R node:node /app
13
+ ENV NODE_ENV=production PORT=7860
14
+ USER node
15
+ EXPOSE 7860
16
+ CMD ["node", "--import", "tsx", "src/hosting/space.ts"]
README.md CHANGED
@@ -1,11 +1,32 @@
1
  ---
2
- title: AutoTrain Advanced
3
- emoji: 🚀
4
- colorFrom: blue
5
- colorTo: green
6
  sdk: docker
 
7
  pinned: false
8
- license: afl-3.0
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Attendwise
3
+ emoji: 🎓
4
+ colorFrom: green
5
+ colorTo: blue
6
  sdk: docker
7
+ app_port: 7860
8
  pinned: false
 
9
  ---
10
 
11
+ # Attendwise
12
+
13
+ Classroom attendance, courses, sessions and teacher appointments in one workspace.
14
+
15
+ This is a teacher pilot deployment. Open the app in a separate browser tab at `/admin/`.
16
+ The dashboard uses secure first-party cookies, so the embedded Space frame is intentionally blocked.
17
+
18
+ The existing CPU Basic allocation has no compute charge. It may sleep when unused.
19
+ The owner must keep `imisa2/attendwise-storage` **private**, mounted read/write at `/data`.
20
+ The app keeps SQLite on local disk and publishes eight rolling complete snapshots to that bucket.
21
+ It restores the latest committed snapshot before accepting requests and waits for persistence
22
+ before returning successful API changes. A failed checksum stops startup for owner recovery.
23
+ Run only one replica. This storage path is for a pilot, not a multi-instance institutional service.
24
+
25
+ On first startup the app generates its own unique runtime secrets and an owner login.
26
+ The owner can retrieve `launch-credentials.json` from the private bucket while signed into Hugging Face.
27
+ That file, the runtime secrets and snapshots are never served by Attendwise or committed to Git.
28
+ Google sign-in and reset email require separate provider configuration; email/password login works now.
29
+
30
+ The image is built from an explicitly pinned source commit in
31
+ [imisa2/bluetooth-attendance](https://github.com/imisa2/bluetooth-attendance).
32
+ The previous AutoTrain starter remains recoverable in this Space's Git history.