Anuj-Panthri commited on
Commit
0636932
·
1 Parent(s): 8839fb3

dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -29,15 +29,25 @@ RUN pip3 install -r requirements.txt --no-cache-dir
29
  # RUN groupadd -r user && useradd -r -g user user
30
 
31
 
32
- RUN rm db.sqlite3
33
  RUN ls -lh
34
  # RUN chown -R user:user /app
35
  # RUN chmod 777 /app/db.sqlite3
36
  # USER user
37
 
38
 
39
- RUN python3 manage.py makemigrations;\
40
- python3 manage.py migrate;
 
 
 
 
 
 
 
 
 
 
41
 
42
  RUN ls -lh
43
 
 
29
  # RUN groupadd -r user && useradd -r -g user user
30
 
31
 
32
+ # RUN rm db.sqlite3
33
  RUN ls -lh
34
  # RUN chown -R user:user /app
35
  # RUN chmod 777 /app/db.sqlite3
36
  # USER user
37
 
38
 
39
+ # RUN python3 manage.py makemigrations;\
40
+ # python3 manage.py migrate;
41
+
42
+
43
+ # Make app folder writeable for the sake of db.sqlite3, and make that file also writeable.
44
+ # Ideally you host the database somewhere else so that the app folders can remain read only.
45
+ # Without these permissions you see the errors "unable to open database file" and
46
+ # "attempt to write to a readonly database", respectively, whenever the app attempts to
47
+ # write to the database.
48
+ RUN chmod g+w /app
49
+ RUN chmod g+w /app/db.sqlite3
50
+
51
 
52
  RUN ls -lh
53