From 5d49a0de4bb44fab84283c4b8259d5fb7ee510b9 Mon Sep 17 00:00:00 2001 From: ahnsugyeong Date: Thu, 16 May 2024 02:41:29 +0900 Subject: [PATCH] [Bug] Include Environment Variables in Docker Compose --- .platform/nginx/conf.d/proxy-dev.conf | 6 ++---- docker-compose.yml | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.platform/nginx/conf.d/proxy-dev.conf b/.platform/nginx/conf.d/proxy-dev.conf index 8f82b984..caf08ccf 100644 --- a/.platform/nginx/conf.d/proxy-dev.conf +++ b/.platform/nginx/conf.d/proxy-dev.conf @@ -3,24 +3,22 @@ server { location / { proxy_pass http://localhost:8080; - proxy_set_header X-Real_IP $remote_addr; + proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; } location /ws/chat { - proxy_pass $service_url; + proxy_pass http://localhost:8080; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; - # WebSocket proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Origin ""; - # Timeout settings for WebSocket proxy_read_timeout 3600s; proxy_send_timeout 3600s; proxy_connect_timeout 60s; diff --git a/docker-compose.yml b/docker-compose.yml index c56330e7..3b60fee6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: - kafka - redis - mongo + env_file: + - .env kafka: image: wurstmeister/kafka:latest