Dobin Yim commited on
Commit
9c3e38c
·
1 Parent(s): c97d8e1

Docker update

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -5,7 +5,8 @@ RUN useradd -m -u 1000 user
5
 
6
  # Set environment variables
7
  ENV HOME=/home/user \
8
- PATH=/home/user/.local/bin:$PATH
 
9
 
10
  # Set the working directory
11
  WORKDIR $HOME/app
@@ -13,9 +14,10 @@ WORKDIR $HOME/app
13
  # Copy the application code and set ownership
14
  COPY --chown=user . $HOME/app
15
 
16
- # Ensure the upload and temp directories exist and have the correct permissions
17
- RUN mkdir -p $HOME/app/uploads $HOME/app/temp && \
18
- chown -R user:user $HOME/app/uploads $HOME/app/temp
 
19
 
20
  # Switch to the user
21
  USER user
 
5
 
6
  # Set environment variables
7
  ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH \
9
+ CHAINLIT_USER_FILES_DIR=/tmp/chainlit_user_files
10
 
11
  # Set the working directory
12
  WORKDIR $HOME/app
 
14
  # Copy the application code and set ownership
15
  COPY --chown=user . $HOME/app
16
 
17
+ # Ensure the necessary directory exists and has the correct permissions
18
+ RUN mkdir -p ${CHAINLIT_USER_FILES_DIR} && \
19
+ chown -R user:user ${CHAINLIT_USER_FILES_DIR} && \
20
+ chmod 777 ${CHAINLIT_USER_FILES_DIR}
21
 
22
  # Switch to the user
23
  USER user