kumahiyo commited on
Commit
0c8f446
1 Parent(s): ea488ba

add static dir

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -0
  2. main.py +2 -0
Dockerfile CHANGED
@@ -47,6 +47,11 @@ COPY ./requirements.txt /code/requirements.txt
47
  # Install requirements.txt
48
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
49
 
 
 
 
 
 
50
  # Set up a new user named "user" with user ID 1000
51
  RUN useradd -m -u 1000 user
52
  # Switch to the "user" user
 
47
  # Install requirements.txt
48
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
49
 
50
+ COPY . .
51
+
52
+ RUN mkdir tmpdir
53
+ RUN chmod 777 tmpdir
54
+
55
  # Set up a new user named "user" with user ID 1000
56
  RUN useradd -m -u 1000 user
57
  # Switch to the "user" user
main.py CHANGED
@@ -51,3 +51,5 @@ def draw(data: Data):
51
  return {"status": "OK", "file": fileName}
52
  else:
53
  return {"status": "SORRY! This file is member only.", "file": ""}
 
 
 
51
  return {"status": "OK", "file": fileName}
52
  else:
53
  return {"status": "SORRY! This file is member only.", "file": ""}
54
+
55
+ app.mount("/static", StaticFiles(directory="/code/tmpdir"), name="/static")