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) - Backend (AdonisJS)
- Frontend (ReactJS) - Frontend (ReactJS)
- ChakraUI (React component library)
- Database (PostgreSQL & Redis) - Database (PostgreSQL & Redis)
- Web server (nginx) - Web server (nginx)
- Socket.IO for chat - 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) - Editing your profile personal data (password, mail, contacts)
- Deployment with Docker - Deployment with Docker
- Adaptive design - Adaptive design
- Night/Light theme
<!-- ## Demo <!-- ## Demo

View File

@ -20,8 +20,9 @@ services:
context: ./educt-client context: ./educt-client
target: production target: production
dockerfile: Dockerfile dockerfile: Dockerfile
environment: args:
- VITE_API_URL=http://api:3333 - API_URL=http://api.localhost
- WS_URL=ws://api.localhost
ports: ports:
- 5000:5000 - 5000:5000
depends_on: 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 { server {
listen 80; listen 80;
server_name localhost; server_name localhost;
location / { location / {
proxy_pass http://client:5000; 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_pass http://api:3333;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;