Spaces:
Sleeping
Sleeping
| 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 |