Niansuh commited on
Commit
6567947
1 Parent(s): a99b093

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM xyhelper/cockroachai:latest
2
+ RUN mkdir -p /app/config && chmod 777 /app/config
3
+ RUN mkdir -p /app/resource/template && chmod 777 /app/resource/template
4
+ ENV OAUTH_URL="http://127.0.0.1:9000/oauth"
5
+ # Create the /config directory and write the configuration to the config.yaml file
6
+ RUN mkdir -p /app/config && \
7
+ echo "cool:" > /app/config/config.yaml && \
8
+ echo " autoMigrate: true" >> /app/config/config.yaml && \
9
+ echo "database:" >> /app/config/config.yaml && \
10
+ echo " default:" >> /app/config/config.yaml && \
11
+ echo " type: \"sqlite\"" >> /app/config/config.yaml && \
12
+ echo " name: \"./config/cool.sqlite\"" >> /app/config/config.yaml && \
13
+ echo " extra: busy_timeout=5000" >> /app/config/config.yaml && \
14
+ echo " createdAt: \"create_time\"" >> /app/config/config.yaml && \
15
+ echo " updatedAt: \"update_time\"" >> /app/config/config.yaml
16
+
17
+ # Set file permissions to 777
18
+ RUN chmod 777 /app/config/config.yaml