Skip to content
Open
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
Binary file added DevOps_Deployment_Documentation_v3.docx
Binary file not shown.
Binary file added DevOps_Deployment_Presentation.pptx
Binary file not shown.
10 changes: 5 additions & 5 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ BACKEND_URL=http://127.0.0.1:8000
BE_ADMIN_EMAIL=admin@admin.com
BE_ADMIN_PASSWORD=admin

DJANGO_SECRET_KEY=...
DJANGO_SECRET_KEY=mysecretkey123456

OPENAI_API_TYPE=...
OPENAI_API_BASE=...
OPENAI_API_VERSION=...
OPENAI_API_KEY=...
OPENAI_API_TYPE=dummy
OPENAI_API_BASE=dummy
OPENAI_API_VERSION=dummy
OPENAI_API_KEY=dummy
12 changes: 12 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.10

WORKDIR /app

COPY dependencies.txt .
RUN pip install -r dependencies.txt

COPY . .

EXPOSE 8000

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
34 changes: 34 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
services:

frontend:
build: ./frontend
ports:
- "3000:3000"
depends_on:
- backend
environment:
- NEXT_PUBLIC_BACKEND_URL=http://localhost:8000

backend:
build: ./backend
ports:
- "8000:8000"
env_file:
- ./backend/.env
depends_on:
- db

db:
image: postgres:15
restart: always
environment:
POSTGRES_DB: appdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data

volumes:
postgres_data:
14 changes: 14 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:18

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY . .

RUN npm run build

EXPOSE 3000

CMD ["npm", "start"]