diff --git a/backend/Dockerfile b/backend/Dockerfile index f12e3d9..0bfcbe6 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,7 @@ # pull official base image FROM python:3 # set work directory -WORKDIR /usr/src/app +WORKDIR /usr/src/app/ # set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 diff --git a/backend/Ugra_hackaton/settings.py b/backend/Ugra_hackaton/settings.py index f5c9319..e9356dc 100644 --- a/backend/Ugra_hackaton/settings.py +++ b/backend/Ugra_hackaton/settings.py @@ -85,7 +85,7 @@ DATABASES = { 'NAME': os.environ.get("POSTGRES_DB"), 'USER': os.environ.get("POSTGRES_USER"), 'PASSWORD': os.environ.get("POSTGRES_PASSWORD"), - 'HOST': '127.0.0.1', + 'HOST': 'db', 'PORT': '5432', } } diff --git a/backend/Ugra_hackaton/urls.py b/backend/Ugra_hackaton/urls.py index ee21fee..5dbec9c 100644 --- a/backend/Ugra_hackaton/urls.py +++ b/backend/Ugra_hackaton/urls.py @@ -6,4 +6,4 @@ from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('back.urls')), -] + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) \ No newline at end of file +] + static(settings.STATIC_URL, document_root = settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh old mode 100644 new mode 100755 diff --git a/backend/requirements.txt b/backend/requirements.txt index 4a736eb..d50eac5 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,26 +1,44 @@ asgiref==3.3.1 +attrs==20.3.0 +bcrypt==3.2.0 +cached-property==1.5.2 certifi==2020.11.8 cffi==1.14.4 chardet==3.0.4 cryptography==3.2.1 defusedxml==0.7.0rc1 +distro==1.5.0 Django==3.1.3 django-braces==1.14.0 django-filter==2.4.0 django-oauth-toolkit==1.3.3 django-rest-framework-social-oauth2==1.1.0 djangorestframework==3.12.2 +docker==4.4.0 +docker-compose==1.27.4 +dockerpty==0.4.1 +docopt==0.6.2 +gunicorn==20.0.4 idna==2.10 +jsonschema==3.2.0 oauthlib==3.1.0 -psycopg2==2.8.6 +paramiko==2.7.2 +Pillow==8.0.1 +psycopg2-binary==2.8.4 pycparser==2.20 PyJWT==1.7.1 +PyNaCl==1.4.0 +pyrsistent==0.17.3 +python-dotenv==0.15.0 python3-openid==3.2.0 pytz==2020.4 +PyYAML==5.3.1 requests==2.25.0 requests-oauthlib==1.3.0 six==1.15.0 social-auth-app-django==4.0.0 social-auth-core==3.3.3 sqlparse==0.4.1 +texttable==1.6.3 urllib3==1.26.2 +websocket-client==0.57.0 diff --git a/docker-compose.yml b/docker-compose.yml index 5e06653..f3663f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ version: '3.7' services: web: - build: ./backend + build: backend/ command: gunicorn Ugra_hackaton.wsgi:application --bind 0.0.0.0:8005 volumes: - - .:/usr/src/app/ + - ./backend:/usr/src/app/ ports: - 8005:8005 env_file: @@ -18,4 +18,4 @@ services: env_file: - ./.env volumes: - postgres_data: \ No newline at end of file + postgres_data: