Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #109

Merged
merged 7 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading