asblr commited on
Commit
aaa1350
·
verified ·
1 Parent(s): 5d52253

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -1,24 +1,27 @@
1
  # Use the official Metabase image
2
- FROM metabase/metabase:latest
 
 
 
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Expose the port Hugging Face Spaces expects
8
- EXPOSE 7860
9
 
10
- # Optional: Set environment variables for configuration
11
  ENV MB_DB_TYPE=sqlite
12
  ENV MB_DB_FILE=/data/metabase.db
13
 
14
- # Create a directory for persistent data
15
  RUN mkdir -p /data
16
 
17
- # Optional: Copy any additional configuration files
18
- # COPY config.json /app/config.json
19
 
20
  # Ensure the data directory is a volume
21
  VOLUME /data
22
 
23
- # Run Metabase
24
  CMD ["java", "-jar", "/app/metabase.jar"]
 
1
  # Use the official Metabase image
2
+ # FROM metabase/metabase:latest
3
+
4
+ # Use a specific version of Metabase known to be stable
5
+ FROM metabase/metabase:v0.47.8
6
 
7
  # Set the working directory
8
  WORKDIR /app
9
 
10
+ # Set Java options for memory management
11
+ ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -Xmx2g"
12
 
13
+ # Set Metabase specific environment variables
14
  ENV MB_DB_TYPE=sqlite
15
  ENV MB_DB_FILE=/data/metabase.db
16
 
17
+ # Create directory for persistent data
18
  RUN mkdir -p /data
19
 
20
+ # Expose the port Hugging Face Spaces expects
21
+ EXPOSE 7860
22
 
23
  # Ensure the data directory is a volume
24
  VOLUME /data
25
 
26
+ # Run Metabase with specific Java options
27
  CMD ["java", "-jar", "/app/metabase.jar"]