Skip to content

Commit 9a61eea

Browse files
authored
Merge pull request #15 from CS3219-AY2526Sem1/init-collaboration-svc
Init collaboration svc
2 parents 067394d + 0d9b130 commit 9a61eea

File tree

6 files changed

+34
-1
lines changed

6 files changed

+34
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/__pycache__/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CS3219 Project (PeerPrep) - AY2526S1
2-
## Group: Gxx
2+
## Group: G37
33

44
### Note:
55
- You are required to develop individual microservices within separate folders within this repository.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM python:3.12-slim AS base
2+
3+
## Recommended environment variables for Python
4+
ENV PYTHONUNBUFFERED=1 \
5+
PYTHONDONTWRITEBYTECODE=1 \
6+
PIP_NO_CACHE_DIR=1
7+
8+
WORKDIR /app
9+
10+
COPY requirements.txt .
11+
12+
RUN pip install --upgrade pip && \
13+
pip install --no-cache-dir -r requirements.txt
14+
15+
COPY . .
16+
17+
# Expose the FastAPI port
18+
EXPOSE 8000
19+
20+
# Run FastAPI with Uvicorn
21+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from fastapi import FastAPI
2+
3+
app = FastAPI()
4+
5+
## API for testing connection
6+
@app.get("/ping")
7+
def ping():
8+
return {"message": "Pong"}
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fastapi
2+
uvicorn[standard]
3+
pydantic

0 commit comments

Comments
 (0)