diff --git a/Makefile b/Makefile index 2115eea..297b5ba 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,6 @@ stop: logs: docker-compose -f docker-compose.yml logs --tail=100 -f $(c) migrate: - docker-compose -f docker-compose.yml run nodejs npm run db:migrate:force + docker-compose -f docker-compose.yml run api npm run db:migrate:force seed: - docker-compose -f docker-compose.yml run nodejs npm run db:seed \ No newline at end of file + docker-compose -f docker-compose.yml run api npm run db:seed \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index a01652f..3edfc60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,16 @@ services: - api networks: - app-network + client: + container_name: client + restart: always + image: educt-client + ports: + - 5000:80 + depends_on: + - api + networks: + - app-network api: container_name: api restart: always diff --git a/nginx/default.conf b/nginx/default.conf index fc21488..8a1856e 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -4,6 +4,18 @@ server { server_name localhost; location / { + proxy_pass http://client:80; + 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 { proxy_pass http://api:3333; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade;