upd nginx & docker-compose config

This commit is contained in:
Sergey Yarkov 2022-06-04 00:39:23 +03:00
parent f9eff97a83
commit 3e1098429b
6 changed files with 17 additions and 15 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vscode

View File

@ -19,6 +19,7 @@ Educt learning management system (LMS) is an application where you can create an
- Backend (AdonisJS)
- Frontend (ReactJS)
- ChakraUI (React component library)
- Database (PostgreSQL & Redis)
- Web server (nginx)
- Socket.IO for chat
@ -36,6 +37,7 @@ Educt learning management system (LMS) is an application where you can create an
- Editing your profile personal data (password, mail, contacts)
- Deployment with Docker
- Adaptive design
- Night/Light theme
<!-- ## Demo

View File

@ -20,8 +20,9 @@ services:
context: ./educt-client
target: production
dockerfile: Dockerfile
environment:
- VITE_API_URL=http://api:3333
args:
- API_URL=http://api.localhost
- WS_URL=ws://api.localhost
ports:
- 5000:5000
depends_on:

@ -1 +1 @@
Subproject commit 57bb798eff6dedb4b3de5a7408d0ca843c6888b7
Subproject commit d366c05d559b46f80193096d66b287883cfea3c4

@ -1 +1 @@
Subproject commit 5a01acdb214addb1e18b5c368b9af0b88897da2c
Subproject commit 5171f654296b488d6d9702bf3ed2d687904e8486

View File

@ -1,21 +1,19 @@
# Frontend
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://client:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
}
}
location /api {
# Backend
server {
listen 80;
server_name api.localhost;
location / {
proxy_pass http://api:3333;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@ -26,4 +24,4 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
}
}
}