Skip to content

Commit

Permalink
Merge pull request #109 from infinitybase/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
guimroque authored Jun 6, 2024
2 parents 7301b74 + 502efa6 commit 983eff6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/api/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
deploy-prod:
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d > /dev/null 2>&1

deploy-stg:
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d > /dev/null 2>&1

deploy-test:
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d > /dev/null 2>&1

database-init:
docker-compose -f docker/database/docker-compose.yml --env-file ${env_file} up --build -d
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@noble/curves": "1.3.0",
"@passwordless-id/webauthn": "1.4.0",
"axios": "1.5.1",
"bakosafe": "0.0.57",
"bakosafe": "0.0.58",
"bcrypt": "5.1.0",
"body-parser": "1.20.2",
"cheerio": "1.0.0-rc.12",
Expand Down
7 changes: 3 additions & 4 deletions packages/api/src/socket/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { io, Socket } from 'socket.io-client';

const { SOCKET_URL } = process.env;

interface IMessage {
sessionId: string; // sessionId
to: string; // username -> recebe a mensagem '[UI]' por exemplo
Expand All @@ -21,8 +19,9 @@ export class SocketClient {
origin,
};

//todo: move this URL to a .env file
const URL = SOCKET_URL;
const isDev = process.env.NODE_ENV === 'development';
const URL = isDev ? process.env.SOCKET_URL : process.env.API_URL;

this.socket = io(URL, { autoConnect: true, auth });
}

Expand Down
2 changes: 1 addition & 1 deletion packages/socket-server/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
deploy:
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d
docker-compose -f docker-compose.yml --env-file ${env_file} up --build -d > /dev/null 2>&1
2 changes: 1 addition & 1 deletion packages/socket-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"keywords": [],
"dependencies": {
"bakosafe": "0.0.57",
"bakosafe": "0.0.58",
"express": "4.17.1",
"express-joi-validation": "5.0.0",
"fuels": "0.88.1",
Expand Down

0 comments on commit 983eff6

Please sign in to comment.