diff --git a/DevOps_Deployment_Documentation_v3.docx b/DevOps_Deployment_Documentation_v3.docx new file mode 100644 index 000000000..85283925f Binary files /dev/null and b/DevOps_Deployment_Documentation_v3.docx differ diff --git a/DevOps_Deployment_Presentation.pptx b/DevOps_Deployment_Presentation.pptx new file mode 100644 index 000000000..a510d7f7b Binary files /dev/null and b/DevOps_Deployment_Presentation.pptx differ diff --git a/backend/.env.example b/backend/.env.example index 2cffd6649..7a01e584b 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -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 \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 000000000..266cdaf96 --- /dev/null +++ b/backend/Dockerfile @@ -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"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..600662c68 --- /dev/null +++ b/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 000000000..5b51e5fbc --- /dev/null +++ b/frontend/Dockerfile @@ -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"] \ No newline at end of file