From a211f25e5472c34e208550e40a188dfbfc79b161 Mon Sep 17 00:00:00 2001 From: kasterra Date: Wed, 22 May 2024 13:55:32 +0900 Subject: [PATCH] env : nginx config --- docker-compose.yml | 16 ++++++++++++++++ nginx.conf | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 nginx.conf diff --git a/docker-compose.yml b/docker-compose.yml index 15cfa5d..ab0bc49 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,3 +4,19 @@ services: image: ghcr.io/kasterra/koj-client:latest ports: - 1705:3000 + networks: + - webnet + 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..7c6800a --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +events {} + +http { + server { + listen 80; + server_name koj.kasterra.dev; + + location / { + proxy_pass http://frontend: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