Anuj-Panthri commited on
Commit
04aadda
·
1 Parent(s): efd0cbc

Dockerfile

Browse files
Files changed (3) hide show
  1. Dockerfile +16 -12
  2. db.sqlite3 +0 -0
  3. templator/settings.py +1 -1
Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
- # FROM python:3.7-alpine
2
- FROM ubuntu:latest
3
 
4
- RUN apt-get update && \
5
- apt-get -y upgrade && \
6
- apt-get install -y \
7
- sudo
8
 
9
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 pip vim mc wget curl
10
 
11
 
12
 
@@ -17,15 +17,19 @@ COPY requirements.txt /app
17
  RUN pip3 install -r requirements.txt --no-cache-dir
18
  COPY . /app
19
 
20
- RUN groupadd -r user && useradd -r -g user user
21
 
22
 
 
23
  RUN ls -lh
24
- RUN chown -R user:user /app
25
- RUN chmod 777 /app/db.sqlite3
 
26
 
27
- USER user
28
- RUN ls -lh
29
 
 
 
 
 
30
 
31
  CMD python3 manage.py runserver 0.0.0.0:8000
 
1
+ FROM python:3.7-alpine
2
+ # FROM ubuntu:latest
3
 
4
+ # RUN apt-get update && \
5
+ # apt-get -y upgrade && \
6
+ # apt-get install -y \
7
+ # sudo
8
 
9
+ # RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 pip vim mc wget curl
10
 
11
 
12
 
 
17
  RUN pip3 install -r requirements.txt --no-cache-dir
18
  COPY . /app
19
 
20
+ # RUN groupadd -r user && useradd -r -g user user
21
 
22
 
23
+ RUN rm db.sqlite3
24
  RUN ls -lh
25
+ # RUN chown -R user:user /app
26
+ # RUN chmod 777 /app/db.sqlite3
27
+ # USER user
28
 
 
 
29
 
30
+ RUN python3 manage.py makemigrations;\
31
+ python3 manage.py migrate;
32
+
33
+ RUN ls -lh
34
 
35
  CMD python3 manage.py runserver 0.0.0.0:8000
db.sqlite3 CHANGED
Binary files a/db.sqlite3 and b/db.sqlite3 differ
 
templator/settings.py CHANGED
@@ -128,4 +128,4 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
128
 
129
  AUTH_USER_MODEL = 'accounts.User'
130
 
131
- CSRF_TRUSTED_ORIGINS = ['http://*','https://*','https://anuj-panthri-poll-app.hf.space']
 
128
 
129
  AUTH_USER_MODEL = 'accounts.User'
130
 
131
+ # CSRF_TRUSTED_ORIGINS = ['http://*','https://*','https://anuj-panthri-poll-app.hf.space']