RJuro commited on
Commit
1e3ae4a
·
verified ·
1 Parent(s): fbd37b5

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +43 -0
  2. README.md +6 -9
Dockerfile ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official NocoDB image
2
+ # You can pin to a specific version for stability if needed, e.g., nocodb/nocodb:0.204.4
3
+ FROM nocodb/nocodb:latest
4
+
5
+ # NocoDB listens on port 8080 by default within the container.
6
+ ENV PORT=8080
7
+ ENV NODE_ENV=production
8
+
9
+ # --- Prepare SQLite data directory and configure SQLite specifically ---
10
+ USER root
11
+
12
+ # Create the directory for the SQLite database file
13
+ RUN mkdir -p /usr/app/data && \
14
+ chown -R node:node /usr/app/data
15
+
16
+ # Explicitly tell NocoDB to use SQLite and where to store the database file.
17
+ ENV NC_DB_TYPE="sqlite3"
18
+ ENV NC_SQLITE_FILENAME="/usr/app/data/noco.db"
19
+
20
+ # The base nocodb/nocodb image will switch back to USER node.
21
+ # USER node
22
+
23
+ # --- IMPORTANT FOR PRODUCTION/PERSISTENCE ---
24
+ # 1. For any serious use, DO NOT rely on SQLite within the container.
25
+ # Data will be lost if the Space restarts or is rebuilt.
26
+ # Configure an EXTERNAL database (PostgreSQL, MySQL, etc.) by setting
27
+ # the appropriate NC_DB or DATABASE_URL as a SECRET in your Hugging Face Space settings.
28
+ # Example for PostgreSQL:
29
+ # NC_DB="pg://USER:PASSWORD@HOST:PORT/DATABASE_NAME"
30
+ # (If using NC_DB for an external database, you would REMOVE NC_DB_TYPE and NC_SQLITE_FILENAME)
31
+
32
+ # 2. Set NC_AUTH_JWT_SECRET as a SECRET in your Hugging Face Space settings.
33
+ # This is crucial for securing authentication tokens.
34
+ # Generate a strong random string for this value.
35
+ # Example:
36
+ # NC_AUTH_JWT_SECRET="your_very_strong_random_jwt_secret_here"
37
+ # ---
38
+
39
+ # Expose the port NocoDB listens on.
40
+ # This port will be mapped by Hugging Face Spaces based on your README.md app_port.
41
+ EXPOSE 8080
42
+
43
+ # The default command for the nocodb/nocodb image is already set up to start NocoDB.
README.md CHANGED
@@ -1,10 +1,7 @@
1
- ---
2
- title: Sdc Nocodb
3
- emoji:
4
- colorFrom: gray
5
- colorTo: green
6
  sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ title: My NocoDB Instance
2
+ emoji: 📊
3
+ colorFrom: yellow
4
+ colorTo: indigo
 
5
  sdk: docker
6
+ app_port: 8080
7
+ pinned: false