Spaces:
Running
Running
File size: 554 Bytes
a6e12a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Use the official SQLite Web image as the base image
FROM ghcr.io/coleifer/sqlite-web:latest
# Set environment variables
ENV STORAGE_DIR="/data/storage"
ENV SERVER_PORT=7860
ENV SQLITE_DATABASE="${STORAGE_DIR}/db_filename.db"
# Expose the server port
EXPOSE ${SERVER_PORT}
# Set the working directory
WORKDIR /data
# Create the storage directory and set permissions
RUN mkdir -p ${STORAGE_DIR} && chmod -R 777 ${STORAGE_DIR}
# Command to run SQLite Web
CMD ["sqlite_web", "--host=0.0.0.0", "--port=${SERVER_PORT}", "--database=${SQLITE_DATABASE}"]
|