CoolFace
Apppublic

vera19/Nocodb1

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile43 linesDownload Raw Back to root
1# Use an official NocoDB image2# You can pin to a specific version for stability if needed, e.g., nocodb/nocodb:0.204.43FROM nocodb/nocodb:latest4 5# NocoDB listens on port 8080 by default within the container.6ENV PORT=80807ENV NODE_ENV=production8 9# --- Prepare SQLite data directory and configure SQLite specifically ---10USER root11 12# Create the directory for the SQLite database file13RUN mkdir -p /usr/app/data && \14    chown -R node:node /usr/app/data15 16# Explicitly tell NocoDB to use SQLite and where to store the database file.17ENV NC_DB_TYPE="sqlite3"18ENV NC_SQLITE_FILENAME="/usr/app/data/noco.db"19 20# The base nocodb/nocodb image will switch back to USER node.21# USER node22 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 setting27#    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.41EXPOSE 808042 43# The default command for the nocodb/nocodb image is already set up to start NocoDB.