From 178ba54649042ea6a2b234ac97a0e34c8a6e6f2e Mon Sep 17 00:00:00 2001 From: cauta Date: Tue, 11 Jun 2024 09:50:36 +0700 Subject: [PATCH] update config --- README.md | 2 +- app/.config/nginx/default.conf.template | 44 ------------------------- app/Makefile | 8 ++--- app/nest-cli.json | 9 ----- 4 files changed, 5 insertions(+), 58 deletions(-) delete mode 100644 app/.config/nginx/default.conf.template diff --git a/README.md b/README.md index 6695d7d..e89c15f 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ make up-deps Start the application. ```bash -yarn start:dev onebox +yarn start:dev api yarn start:dev monitor-service yarn start:dev worker-service ``` diff --git a/app/.config/nginx/default.conf.template b/app/.config/nginx/default.conf.template deleted file mode 100644 index f91589e..0000000 --- a/app/.config/nginx/default.conf.template +++ /dev/null @@ -1,44 +0,0 @@ -map $http_upgrade $connection_upgrade { - - default upgrade; - '' close; -} - -server { - listen 80; - server_name ${API_DOMAIN}; - proxy_http_version 1.1; - - location / { - proxy_pass http://crypitor-onebox:$SERVER_PORT/; - proxy_http_version 1.1; - 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"; - proxy_set_header Upgrade "$http_upgrade"; - proxy_set_header Connection $connection_upgrade; - proxy_cache_bypass $http_upgrade; - } -} - -server { - listen 443 ssl; - server_name ${API_DOMAIN}; - proxy_http_version 1.1; - - ssl_certificate /etc/letsencrypt/live/${API_DOMAIN}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/${API_DOMAIN}/privkey.pem; - - location / { - proxy_pass http://crypitor-onebox:$SERVER_PORT/; - proxy_http_version 1.1; - 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"; - proxy_set_header Upgrade "$http_upgrade"; - proxy_set_header Connection $connection_upgrade; - proxy_cache_bypass $http_upgrade; - } -} \ No newline at end of file diff --git a/app/Makefile b/app/Makefile index 6549de9..acb63c4 100644 --- a/app/Makefile +++ b/app/Makefile @@ -45,21 +45,21 @@ build-dev: .PHONY: log log: @echo "Building application and starting container in background mode..." - docker compose -f docker-compose-dev.yml logs onebox monitor worker -f -n 10 + docker compose -f docker-compose-dev.yml logs api monitor worker -f -n 10 .PHONY: down down: - @echo "Shutting down and removing containers for onebox..." + @echo "Shutting down and removing containers for api..." @docker compose -f docker-compose-dev.yml down .PHONY: stop stop-dev: - @echo "Stopping containers for onebox..." + @echo "Stopping containers for api..." @docker compose -f docker-compose-dev.yml stop .PHONY: shell shell: - @docker exec -ti onebox /bin/sh + @docker exec -ti api /bin/sh .PHONY: shell-db shell-db: diff --git a/app/nest-cli.json b/app/nest-cli.json index 46cc129..12130c5 100644 --- a/app/nest-cli.json +++ b/app/nest-cli.json @@ -18,15 +18,6 @@ "tsConfigPath": "apps/api/tsconfig.app.json" } }, - "onebox": { - "type": "application", - "root": "apps/onebox", - "entryFile": "main", - "sourceRoot": "apps/onebox/src", - "compilerOptions": { - "tsConfigPath": "apps/onebox/tsconfig.app.json" - } - }, "monitor-service": { "type": "application", "root": "apps/monitor-service",