From f18bae0ff8d70e5e5961bcd7ee2926ed312b9d5b Mon Sep 17 00:00:00 2001 From: kasterra Date: Wed, 22 May 2024 13:47:17 +0900 Subject: [PATCH] env : nginx config --- docker-compose.yml | 14 ++++++++++++++ nginx.conf | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 nginx.conf diff --git a/docker-compose.yml b/docker-compose.yml index 15cfa5d..89b47aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,3 +4,17 @@ services: image: ghcr.io/kasterra/koj-client:latest ports: - 1705:3000 + nginx: + container_name: nginx + image: nginx:latest + ports: + - "80:80" + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf + depends_on: + - frontend + networks: + - webnet + +networks: + webnet: diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a8c599b --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +events {} + +http { + server { + listen 80; + server_name koj.kasterra.dev; + + location / { + proxy_pass http://172.24.0.2:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + } +} \ No newline at end of file