Skip to content

Commit e207858

Browse files
authored
Merge pull request #96 from CS3219-AY2425S1/ecs-deployment
Ecs deployment
2 parents 22f1e4c + 95a8a9b commit e207858

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,3 @@ PEERPREP_QUESTION_INITDB_NAME=peerprepQuestionServiceDB # must match question se
1616
PEERPREP_USER_INITDB_NAME=peerprepUserServiceDB # must match user service .env file and init-mongo.js
1717
PEERPREP_MATCHING_INITDB_NAME=peerprepMatchingServiceDB # must match user service .env file and init-mongo.js
1818
PEERPREP_COLLABORATION_INITDB_NAME=peerprepCollaborationServiceDB # must match collab service .env file and init-mongo.js
19-
20-
REACT_APP_LOCAL_API_URL=http://localhost #http://52.221.131.145 for production
21-
REACT_APP_SOCKET_URL=http://localhost:3003 #http://52.221.131.145:3003 for production

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ services:
125125
- CHOKIDAR_USEPOLLING=true
126126
- WATCHPACK_POLLING=true
127127
- WDS_SOCKET_PORT=0
128-
- REACT_APP_LOCAL_API_URL=${REACT_APP_LOCAL_API_URL}
129-
- REACT_APP_SOCKET_URL=${REACT_APP_SOCKET_URL}
130128

131129
# Nginx API Gateway
132130
nginx:

frontend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
REACT_APP_LOCAL_API_URL=http://localhost
22
REACT_APP_SOCKET_URL=http://localhost:3003
3+
REACT_APP_COLLAB_SOCKET_URL=localhost:3004
34

45
# Copy root .env
56
# If using mongoDB containerization, set to true. Else set to false (i.e local testing)

frontend/src/domain/context/CollaborationContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const CollaborationProvider: React.FC<{ children: ReactNode }> = ({ child
5050
useEffect(() => {
5151
if (!roomId) return;
5252
const ydoc = new Y.Doc();
53-
const provider = new WebsocketProvider(`ws://localhost:3004/${roomId}`, roomId, ydoc);
53+
const provider = new WebsocketProvider(`ws://${process.env.REACT_APP_COLLAB_SOCKET_URL}/${roomId}`, roomId, ydoc);
5454
setProvider(provider);
5555

5656
provider.awareness.setLocalStateField(USERNAME, username);

0 commit comments

Comments
 (0)