Skip to content

Commit

Permalink
Merge pull request #43 from CS3219-AY2425S1/development_branch
Browse files Browse the repository at this point in the history
Milestone 5, 6 and 7
  • Loading branch information
delishad21 authored Nov 9, 2024
2 parents ab5b608 + aad36f2 commit 85cba67
Show file tree
Hide file tree
Showing 230 changed files with 48,029 additions and 1,703 deletions.
27 changes: 23 additions & 4 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
NEXT_PUBLIC_USER_SERVICE_URL=http://localhost:8004
NEXT_PUBLIC_MATCHING_SERVICE_URL=http://localhost:8002
NEXT_PUBLIC_QUESTION_SERVICE_URL=http://localhost:8003
# NEXT_PUBLIC_IMAGE_UPLOAD_KEY= <your-image-upload-key>
NEXT_PUBLIC_COLLAB_SERVICE_URL=http://localhost:8010
NEXT_PUBLIC_MATCHING_SOCKET_URL=http://localhost:8002
NEXT_PUBLIC_COLLAB_SOCKET_URL=http://localhost:8010
# NEXT_PUBLIC_IMAGE_UPLOAD_KEY=
FRONTEND_PORT=3000
FRONTEND_URL=localhost:3000


# User Service

Expand All @@ -12,16 +17,18 @@ FRONTEND_PORT=3000
USER_MONGO_INITDB_ROOT_USERNAME=userroot
USER_MONGO_INITDB_ROOT_PASSWORD=userpassword

USER_PORT=8004
GMAIL_USER= # email here
GMAIL_PASS= # password here

USER_PORT=8004
ENV=PROD

# Secret for creating JWT signature
JWT_SECRET=you-can-replace-this-with-your-own-secret

# Question Service

# QUESTION_MONGODB_URI= # (Set this to your remote MongoDB URI, comment out if using local)
# QUESTION_MONGODB_URI= # (Set this to your remote MongoDB URI, comment out if using local)

QUESTION_MONGO_INITDB_ROOT_USERNAME=questionroot
QUESTION_MONGO_INITDB_ROOT_PASSWORD=questionpassword
Expand All @@ -31,8 +38,20 @@ QUESTION_PORT=8003
# Matching Service

MATCHING_SERVICE_PORT=8002
USER_SERVICE_URL=http://g38-user-service:8004
REDIS_URL=redis://redis:6379
MATCHING_SERVICE_LOGS_DIR=./logs
# Timeout for matching in milliseconds
MATCHING_TIMEOUT=10000

# Collaboration Service
# COLLAB_MONGODB_URI= # (Set this to your remote MongoDB URI, comment out if using local)
COLLAB_MONGO_INITDB_ROOT_USERNAME=root
COLLAB_MONGO_INITDB_ROOT_PASSWORD=password
COLLAB_SERVICE_PORT=8010
COLLAB_REDIS_URL=redis://collab-redis:6379

# For use by all services
USER_SERVICE_URL=http://g38-user-service:8004
COLLAB_SERVICE_URL=http://g38-collaboration-service:8010
QUESTION_SERVICE_URL=http://g38-question-service:8003
COLLAB_API_KEY=collab-api-key
137 changes: 0 additions & 137 deletions .github/workflows/ci.yml.old

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Push Docker Images

on:
push:
branches:
- main
- development_branch
pull_request:
branches:
- main
- development_branch

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
# Step 1: Check out the repository
- name: Check out the code
uses: actions/checkout@v3

# Step 2: Log in to Docker Hub
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

# Step 3: Run the build and push script
- name: Build and push Docker images
run: |
chmod +x ./build_and_push_services_dev.sh
./build_and_push_services_dev.sh
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ dist

# Redis dump
redis-data/
collab-redis-data/

frontend/peerprep/next.config.js

# MongoDB data directory
mongo-data/
question-mongo-data/
user-mongo-data/
collab-mongo-data/

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

Expand Down Expand Up @@ -176,3 +178,6 @@ yarn-error.log*
next-env.d.ts

/question-service/scripts/

.vscode

Loading

0 comments on commit 85cba67

Please sign in to comment.