diff --git a/client/Dockerfile b/client/Dockerfile index 57a7dc5..6a7666d 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,9 +1,6 @@ # Use an official nginx image FROM nginx:alpine -# Copy the static content into the Nginx server -COPY . /usr/share/nginx/html - # Expose port 80 EXPOSE 80 diff --git a/client/index.html b/client/index.html index 8fb13e4..e80b533 100644 --- a/client/index.html +++ b/client/index.html @@ -1,10 +1,33 @@ - Hello World Client + Simple Frontend + -

Hello World from Client

+

Welcome to the Proof of Concept Frontend

+ +
+ +
- diff --git a/docker-compose.yml b/docker-compose.yml index fdbb8cc..c39aeaf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,8 @@ services: build: ./client ports: - "3000:80" + volumes: + - ./client:/usr/share/nginx/html depends_on: - backend diff --git a/server/requirements.txt b/server/requirements.txt index f1a5d00..b1c72db 100644 Binary files a/server/requirements.txt and b/server/requirements.txt differ diff --git a/server/server/settings.py b/server/server/settings.py index 95ff68c..70a5861 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -25,6 +25,19 @@ SECRET_KEY = "django-insecure-^^r9o7z%c(x51odhohd_a5k7v%1gh@2-br!g_x450+27i_2h-n # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +# SECURITY WARNING: update this when you have the production host +CORS_ALLOW_ALL_ORIGINS = True + +CORS_ALLOW_METHODS = [ + "DELETE", + "GET", + "OPTIONS", + "PATCH", + "POST", + "PUT", +] + + ALLOWED_HOSTS = ["0.0.0.0" ,"localhost", "127.0.0.1"] @@ -39,11 +52,13 @@ INSTALLED_APPS = [ "django.contrib.staticfiles", "rest_framework", "server", + "corsheaders", ] MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", + "corsheaders.middleware.CorsMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware",