diff --git a/docker-compose.yml b/docker-compose.yml index 7805db2..29f30cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,9 +24,6 @@ services: container_name: front build: ./searching-front restart: always - ports: - - 80:3000 - - 8080:8080 watcher: container_name: watcher depends_on: @@ -35,8 +32,12 @@ services: context: ./searching-front dockerfile: Dockerfile.watcher restart: always + nginx: + restart: always + build: + context: ./nginx ports: - - 8888:8080 + - "80:80" networks: es-net: diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..b77b8ee --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx +COPY default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..71ed854 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,11 @@ +server { + location / { + proxy_set_header Host $host; + proxy_set_header HelloMatthew True; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_pass http://front:3000; + } +} \ No newline at end of file