From 4d2ea3f4f2be99e73cb388af49a23a71cf693a3c Mon Sep 17 00:00:00 2001 From: kohler Date: Sat, 27 Jul 2024 19:08:25 +0200 Subject: [PATCH] DEAR-98 add newest nginx.conf, and docker-compose.yml from server --- .github/docker-compose.yml | 26 ++++++++++++++----- .github/nginx.conf | 47 +++++++++++++++++++++++++++++++++ .github/nginx.yml | 53 -------------------------------------- 3 files changed, 66 insertions(+), 60 deletions(-) create mode 100644 .github/nginx.conf delete mode 100644 .github/nginx.yml diff --git a/.github/docker-compose.yml b/.github/docker-compose.yml index 12aa895..5d73c57 100644 --- a/.github/docker-compose.yml +++ b/.github/docker-compose.yml @@ -1,33 +1,42 @@ -##docker-compose for server +## copy of the docker-compose file on the server +## backend, frontend, db, nginx + #version: '3.9' -#services: # +#services: # frontend: # container_name: frontend # image: ghcr.io/24fsiit16/dear-dev-frontend:latest -# environment: -# - NEXT_TRUST_HOST=true # ports: # - "3000:3000" +# env_file: +# - .env +# depends_on: +# - backend # -# db: +# yappi_db: # image: postgres:13 -# container_name: postgres_db +# container_name: yappi_db # environment: # POSTGRES_USER: ${POSTGRES_USER} # POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} +# POSTGRES_DB: postgres # ports: # - "5432:5432" # volumes: # - postgres_data:/var/lib/postgresql/data +# env_file: +# - .env # # backend: # container_name: backend # image: ghcr.io/24fsiit16/dear-dev-backend:latest # ports: # - "8080:8080" +# env_file: +# - .env # depends_on: -# - db +# - yappi_db # # nginx: # container_name: nginx @@ -40,5 +49,8 @@ # - frontend # - backend # +# #volumes: # postgres_data: +# + diff --git a/.github/nginx.conf b/.github/nginx.conf new file mode 100644 index 0000000..be2aa13 --- /dev/null +++ b/.github/nginx.conf @@ -0,0 +1,47 @@ +# copy of the nginx setup on our server + +# events {} +# +# http { +# server { +# listen 80; +# server_name yappi.ch www.yappi.ch; +# +# location / { +# proxy_pass http://frontend:3000; +# proxy_set_header Host $host; +# 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; +# } +# +# location /api/ { +# proxy_pass http://frontend:3000; +# proxy_set_header Host $host; +# 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; +# } +# +# location /v1/ { +# proxy_pass http://backend:8080; +# proxy_set_header Host $host; +# 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; +# } +# +# location /auth/github/callback { +# proxy_pass http://frontend/; +# proxy_set_header Host $host; +# 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; +# } +# +# } +# } +# +# +# +# diff --git a/.github/nginx.yml b/.github/nginx.yml deleted file mode 100644 index 79ac94f..0000000 --- a/.github/nginx.yml +++ /dev/null @@ -1,53 +0,0 @@ -#NGINX - -#GNU nano 6.2 nginx.conf * -# events {} -# -# http { -# server { -# listen 80; -# server_name _; -# -# location / { -# proxy_pass http://frontend:3000; -# proxy_set_header Host $host; -# 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; -# } -# -# location /api/ { -# proxy_pass http://backend:8080; -# proxy_set_header Host $host; -# 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; -# } -# } -#} -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -