File size: 788 Bytes
8839fb3
c78a2f4
 
99fe37c
ed3b1a3
 
99fe37c
d84365c
16c7e85
0636932
16c7e85
4cefd10
16c7e85
0636932
 
 
 
 
 
 
 
 
bce93c9
 
 
04aadda
ed3b1a3
bffaf29
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.7-alpine


EXPOSE 8000
COPY . /app 
WORKDIR /app 
RUN pip3 install -r requirements.txt --no-cache-dir


# RUN rm db.sqlite3
RUN ls -lh


# RUN python3 manage.py makemigrations;\
#     python3 manage.py migrate;


# Make app folder writeable for the sake of db.sqlite3, and make that file also writeable.
# Ideally you host the database somewhere else so that the app folders can remain read only.
# Without these permissions you see the errors "unable to open database file" and
# "attempt to write to a readonly database", respectively, whenever the app attempts to
# write to the database.
RUN chmod g+w /app;                                          
RUN chmod g+w /app/db.sqlite3;
# upper commands are working !

RUN ls -lh

CMD  python3 manage.py runserver 0.0.0.0:8000