Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
e4d83e1
feat: deployment actions for running the service (#33)
prakashchoudhary07 May 22, 2025
0d9cc02
Merge pull request #47 from Real-Dev-Squad/fix-deployment-docker-file
prakashchoudhary07 May 28, 2025
f69f044
feat:Implements the GET `/tasks/{task_id}` endpoint to retrieve detai…
Achintya-Chatterjee May 29, 2025
255efb5
Feat: Implement DELETE /tasks/{task_id}/ API to soft delete a specifi…
AnujChhikara Jun 2, 2025
a10d480
Feat: API endpoint for partially updating a task's details using `PA…
Achintya-Chatterjee Jun 4, 2025
5bda8e4
feat: Implement PATCH /tasks/{task_id} endpoint unit tests (#73)
Achintya-Chatterjee Jun 4, 2025
d0875e5
feat(test): integrate MongoDB Testcontainer and refactor integration …
AnujChhikara Jun 15, 2025
5bb4ec1
feat(auth): Implemented google and rds based authentication for todo-…
VaibhavSingh8 Jun 17, 2025
3270fb2
test: adds test cases for authentication (#83)
VaibhavSingh8 Jun 17, 2025
d95b7bf
feat: Add PATCH endpoint to defer a task (#78)
Achintya-Chatterjee Jun 21, 2025
666ab05
feat(auth): store actual user ID on task actions (#94)
AnujChhikara Jul 6, 2025
a70edb4
swagger support (#98)
iamitprakash Jul 6, 2025
3396fbd
feat: GET v1/labels (#95)
shobhan-sundar-goutam Jul 6, 2025
01be215
feat: Add Swagger UI at base path in URL configuration (#100)
prakashchoudhary07 Jul 6, 2025
a2e39a1
refactored google auth callback (#101)
VaibhavSingh8 Jul 6, 2025
aa27e75
feat: Update Swagger UI settings for production and staging environme…
prakashchoudhary07 Jul 6, 2025
58c5d36
feat: Add missing environment variables for Docker run command in dep…
prakashchoudhary07 Jul 6, 2025
65e1567
Merge pull request #106 from Real-Dev-Squad/fix-add-env-keys-to-docker
prakashchoudhary07 Jul 6, 2025
50ec712
fix add env keys to docker (#108)
prakashchoudhary07 Jul 6, 2025
405746f
feat: Set Django settings module in Dockerfile (#109)
prakashchoudhary07 Jul 6, 2025
e0d50b8
Revert settings (#110)
prakashchoudhary07 Jul 6, 2025
3f88aea
fix: adds RSA tokens and adjusted logic (#102)
VaibhavSingh8 Jul 7, 2025
8866c1c
Fix: init replica set for mongo db during start (#87)
prakashchoudhary07 Jul 7, 2025
9f68bb7
fix: add GOOGLE_OAUTH_REDIRECT_URI environment variable to deployment…
prakashchoudhary07 Jul 8, 2025
21f1ada
feat: add FRONTEND_URL environment variable to deployment script (#117)
prakashchoudhary07 Jul 8, 2025
d2c8322
feat: Update deploy workflow to include fix-staging-build branch and …
prakashchoudhary07 Jul 9, 2025
9860367
Fix staging build (#121)
prakashchoudhary07 Jul 9, 2025
c9d5176
refactor: cookie, rsa and other variable names used in auth (#118)
VaibhavSingh8 Jul 9, 2025
b0113e6
feat: Add sorting functionality to `GET /v1/tasks` endpoint (#107)
Achintya-Chatterjee Jul 10, 2025
b9ec530
feat: implement user profile and task retrieval features (#119)
AnujChhikara Jul 10, 2025
251b054
fix staging build (#124)
prakashchoudhary07 Jul 10, 2025
6cf09b7
fix staging build (#125)
prakashchoudhary07 Jul 10, 2025
e4df7bb
fix: update COOKIE_SAMESITE setting to NONE for Google cookie in stag…
prakashchoudhary07 Jul 10, 2025
5d39edf
fix: implement user authentication and task filtering for GET /v1/tas…
Achintya-Chatterjee Jul 11, 2025
c264ef8
feat: create teams (#127)
lakshayman Jul 11, 2025
ec888d3
feat: search users (#129)
lakshayman Jul 11, 2025
cf23ce1
feat: invite code in team (#133)
lakshayman Jul 11, 2025
610b4c7
fix: inconsistent null field handling across task endpoints (#135)
Achintya-Chatterjee Jul 11, 2025
f3c3f87
feat(labels): implement fixed label system with database migration (#…
Achintya-Chatterjee Jul 11, 2025
a56cb7b
feat: task assignee relation collection (#136)
lakshayman Jul 12, 2025
cf396e5
feat: Implement role management functionality (#114)
vinit717 Jul 12, 2025
16391a8
chore refactor auth (#138)
prakashchoudhary07 Jul 13, 2025
634357d
feat: Update environment configuration for Swagger UI path (#141)
prakashchoudhary07 Jul 13, 2025
c39f255
chore update readme (#142)
prakashchoudhary07 Jul 13, 2025
6153faa
feat: task add to watchlist - POST /watchlist/tasks (#139)
shobhan-sundar-goutam Jul 13, 2025
603a7ed
Feat/get watchlisted tasks (#140)
shobhan-sundar-goutam Jul 13, 2025
aaab03b
feat: implement update functionality for watchlist tasks (#144)
AnujChhikara Jul 13, 2025
926d641
feat: adds api to get list of teams for a user (#145)
yesyash Jul 13, 2025
0bffd57
feat: add endpoint to retrieve team details by ID (#150)
amit-flx Jul 14, 2025
5064ad9
feat: add functionality to retrieve users by team ID and update team …
amit-flx Jul 14, 2025
e89ce55
feat: refactor user retrieval in team detail view to improve readabil…
amit-flx Jul 14, 2025
73bee99
feat: ensure team creator is added as a member when creating a team (…
amit-flx Jul 14, 2025
6c38c10
feat: set is_active to True for new team members upon team creation (…
amit-flx Jul 14, 2025
1edc267
feat: add method to retrieve user information by team ID and correspo…
amit-flx Jul 14, 2025
f24e9d1
feat: add unauthorized task operation tests for defer, update, and de…
AnujChhikara Jul 14, 2025
52d22ad
Team member fix (#157)
amit-flx Jul 14, 2025
55a6f68
feat: add users field to TeamDTO and update team detail view to inclu…
prakashchoudhary07 Jul 14, 2025
25b0c77
feat: add debug mode support for Django with VS Code integration (#158)
prakashchoudhary07 Jul 14, 2025
7e9a69d
feat: implement task validation utility and add tests for task existe…
amit-flx Jul 14, 2025
22580ce
feat: add task assignment functionality with validation and CRUD oper…
amit-flx Jul 14, 2025
e97a91d
feat: enhance watchlist retrieval to convert ObjectId fields to strin…
amit-flx Jul 14, 2025
1507100
feat: add 'in_watchlist' property to TaskDTO and update task retrieva…
amit-flx Jul 14, 2025
282e96d
feat: update task DTO preparation to include user ID in task service …
amit-flx Jul 14, 2025
60d5d84
Enhance watchlist functionality and API documentation (#165)
amit-flx Jul 14, 2025
f83f818
feat: enhance task assignment retrieval and update logic to support s…
amit-flx Jul 14, 2025
10f31a8
feat: add endpoint and logic for joining a team by invite code (#167)
amit-flx Jul 16, 2025
ea5eb09
feat: add teamId filter to task retrieval and update related logic (#…
amit-flx Jul 16, 2025
21b30cc
fix: update assignee task retrieval to handle ObjectId conversion (#170)
amit-flx Jul 16, 2025
0e0f58a
feat: enhance logging and error handling in task repositories (#172)
amit-flx Jul 16, 2025
58f701c
feat: enhance team retrieval to include user details and addedOn fiel…
amit-flx Jul 16, 2025
842ca28
feat: update team basic details and members (#169)
lakshayman Jul 16, 2025
170284a
feat: add endpoint and logic for adding team members (#174)
amit-flx Jul 16, 2025
6097e6b
feat: add endpoint to set or update executor for team-assigned tasks …
amit-flx Jul 17, 2025
8aeefaa
Add role-based permission management (#146)
vinit717 Jul 17, 2025
89ff8a7
Revert "Add role-based permission management (#146)" (#177)
yesyash Jul 17, 2025
470c122
Update task.py (#178)
iamitprakash Jul 17, 2025
184a84d
feat: add endpoint to assign tasks to users (#180)
amit-flx Jul 17, 2025
2a36d8b
Get all users api (#179)
prakashchoudhary07 Jul 17, 2025
4963fba
fix: allow picture field to be optional in UserModel (#182)
prakashchoudhary07 Jul 17, 2025
f52b6d3
fix: update response message and remove empty users check in UsersVie…
prakashchoudhary07 Jul 18, 2025
bede0dc
refactor: streamline label validation in TaskService (#185)
amit-flx Jul 18, 2025
bccdc17
refactor: simplify label processing in TaskService (#187)
amit-flx Jul 18, 2025
821240a
fix: add debug logging for missing label IDs in TaskService (#188)
amit-flx Jul 18, 2025
5fefa0b
refactor: clean up unused fields and improve code formatting in Label…
prakashchoudhary07 Jul 18, 2025
bc03d29
feat: add utility function to convert ObjectId to string in Watchlist…
amit-flx Jul 18, 2025
ee29981
refactor: update task assignment handling to use relation_type instea…
prakashchoudhary07 Jul 18, 2025
8eb1cfc
refactor: sending full label details in task watchlist response (#191)
AnujChhikara Jul 18, 2025
bcea95d
refactor: remove AssigneeTaskDetailsDTO and related repository, updat…
amit-flx Jul 18, 2025
6fb3041
refactor: update task assignment DTO to use CreateTaskAssignmentDTO (…
amit-flx Jul 18, 2025
94e3595
refactor: update task assignment logic to use user_type instead of re…
amit-flx Jul 18, 2025
1fb3de4
feat: add assignee_name to TaskAssignmentDTO and update TaskService (…
AnujChhikara Jul 18, 2025
d4f074d
refactor: make assignee_name optional in TaskAssignmentDTO and TaskAs…
amit-flx Jul 18, 2025
ac0c702
fix: update task assignment URL to remove trailing slash (#198)
AnujChhikara Jul 18, 2025
e65dd57
fix: return priority as enum string in watchlist API (#199)
Achintya-Chatterjee Jul 18, 2025
7129d48
feat: enhance CreateTaskSerializer with detailed field descriptions a…
amit-flx Jul 18, 2025
9cb6d16
refactor: simplify task query filters in TaskRepository (#202)
amit-flx Jul 18, 2025
23fa892
feat: add task update functionality with assignee management (#203)
amit-flx Jul 18, 2025
e6c0b5e
feat: implement update_task_with_assignee_from_dict method for partia…
amit-flx Jul 18, 2025
e613d5c
feat: update TaskAssignmentModel to use PyObjectId for ID fields (#205)
AnujChhikara Jul 18, 2025
1ca56ff
refactor: rename relation_type to user_type in task assignment logic …
amit-flx Jul 18, 2025
efcd43e
refactor: update task assignment logic and enhance team member checks…
amit-flx Jul 18, 2025
1952400
feat: add executor_id to task assignment DTOs and enhance executor up…
amit-flx Jul 19, 2025
3da39e6
refactor: rename executor_id to assignee_id in task assignment update…
amit-flx Jul 19, 2025
fe4a68b
refactor: update task assignment logic to remove ObjectId conversion …
yesyash Jul 19, 2025
cf9997b
feat: add assignee details to watchlist tasks (#211)
amit-flx Jul 19, 2025
e27c352
refactor: remove debug and test scripts for assignee functionality (#…
amit-flx Jul 19, 2025
6287896
refactor: clean up formatting and improve clarity in watchlist reposi…
amit-flx Jul 19, 2025
825b0c0
Update README.md
iamitprakash Jul 20, 2025
6cd709c
Update README.md
iamitprakash Jul 20, 2025
722e518
refactor: remove invite_code from team responses in API views (#219)
amit-flx Jul 21, 2025
ef47809
feat: add team invite code retrieval endpoint (#220)
amit-flx Jul 21, 2025
efc4c8f
feat: implement team activity timeline endpoint and enhance audit log…
amit-flx Jul 21, 2025
1c45687
feat: add method to retrieve multiple tasks by their IDs in a single …
amit-flx Jul 21, 2025
34c3f4f
refactor: remove invite_code handling from team creation response (#226)
AnujChhikara Jul 23, 2025
3e51495
fix: add status filtering to tasks API with DONE exclusion by default…
Achintya-Chatterjee Jul 23, 2025
7f4aaa0
feat: add case-insensitive choice field for task status filtering (#228)
amit-flx Jul 23, 2025
72a5466
Update task_repository.py
iamitprakash Jul 23, 2025
6007932
feat: add remove team member functionality (#230)
amit-flx Jul 24, 2025
039488b
feat: enhance audit logging for team management actions (#233)
amit-flx Jul 26, 2025
bbc8023
fix: show team-assigned tasks only on POC dashboard (#234)
Achintya-Chatterjee Jul 29, 2025
660c5d7
fix(audit-log): use assignment service to create task assignment (#236)
Hariom01010 Jul 30, 2025
f0cfd2c
Refactor: get task query to handle deferred task logic (#237)
AnujChhikara Aug 4, 2025
81b255c
fix(valid-due-date): update serializer to compare only dates in the u…
Hariom01010 Aug 4, 2025
0cbd912
feat: add deferred details to watchlist DTO (#242)
AnujChhikara Aug 6, 2025
02ba88d
refactor: implement team isolation for task assignments (#240)
Achintya-Chatterjee Aug 6, 2025
af8b098
Implement user-role management system with predefined roles (#218)
vinit717 Aug 8, 2025
cbbc0cb
Watchlist fix (#246)
iamitprakash Aug 13, 2025
f917f21
Update watchlist_repository.py (#247)
iamitprakash Aug 13, 2025
b731fe9
New wtchlist fix (#248)
iamitprakash Aug 13, 2025
f755a88
feat: use updatedAt as default sorting for all tasks (#244)
MayankBansal12 Aug 15, 2025
5400bea
feat: Add team creation invite code system with admin-only access (#249)
AnujChhikara Aug 20, 2025
ac46028
feat: Add ADMIN_EMAILS environment variable to deployment and test wo…
prakashchoudhary07 Aug 21, 2025
fc31c17
feat: add recent activity sort for watchlist task (#251)
MayankBansal12 Aug 22, 2025
4d042bc
feat: add PostgreSQL environment variables for deployment and testing…
prakashchoudhary07 Aug 28, 2025
781100f
feat(database): Add unified MongoDB and PostgreSQL dual-write mechani…
AnujChhikara Aug 28, 2025
7932018
chore: update README.md title for clarity (#262)
AnujChhikara Aug 28, 2025
903a557
Update README.md
iamitprakash Aug 28, 2025
f64c2a1
Update README.md
iamitprakash Aug 28, 2025
5d48526
feat: add command to run migration before starting server, environmen…
prakashchoudhary07 Aug 31, 2025
e324864
fix: correct syntax for setting PYTHONUNBUFFERED environment variable…
prakashchoudhary07 Aug 31, 2025
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
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/

**/.DS_Store
**/__pycache__
**/.venv
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose.y*ml
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
35 changes: 34 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,37 @@ ENV='DEVELOPMENT'
SECRET_KEY='unique-secret'
ALLOWED_HOSTS='localhost,127.0.0.1'
MONGODB_URI='mongodb://localhost:27017'
DB_NAME='todo-app'
DB_NAME='db-name'
# GOOGLE OAUTH SETTINGS
GOOGLE_OAUTH_CLIENT_ID="google-client-id"
GOOGLE_OAUTH_CLIENT_SECRET="client-secret"
GOOGLE_OAUTH_REDIRECT_URI="http://localhost:8000/v1/auth/google/callback"

PRIVATE_KEY="generate keys and paste here"
PUBLIC_KEY="generate keys and paste here"

ACCESS_LIFETIME=3600
REFRESH_LIFETIME=604800

ACCESS_TOKEN_COOKIE_NAME='todo-access'
REFRESH_TOKEN_COOKIE_NAME='todo-refresh'
COOKIE_DOMAIN='localhost'
COOKIE_SECURE='true'
COOKIE_HTTPONLY=True
COOKIE_SAMESITE='Strict'

TODO_UI_BASE_URL='http://localhost:3000'
TODO_UI_REDIRECT_PATH='dashboard'
TODO_BACKEND_BASE_URL='http://localhost:8000'

CORS_ALLOWED_ORIGINS='http://localhost:3000,http://localhost:8000'

SWAGGER_UI_PATH='/api/schema'

ADMIN_EMAILS = "admin@gmail.com,admin2@gmail.com"

POSTGRES_DB=todo_postgres
POSTGRES_HOST=postgres
POSTGRES_PASSWORD=todo_password
POSTGRES_PORT=5432
POSTGRES_USER=todo_user
89 changes: 89 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Deploy to EC2

on:
push:
branches:
- main
- develop

jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 10
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: production.Dockerfile
platforms: linux/arm64
push: true
build-args: |
ENV=${{ vars.ENV }}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ github.sha }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Deploy to EC2
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.AWS_EC2_HOST }}
username: ${{ secrets.AWS_EC2_USERNAME }}
key: ${{ secrets.AWS_EC2_SSH_PRIVATE_KEY }}
script: |
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest
docker stop ${{ github.event.repository.name }}-${{ vars.ENV }} || true
docker rm ${{ github.event.repository.name }}-${{ vars.ENV }} || true
docker run -d -p ${{ vars.PORT }}:8000 \
--name ${{ github.event.repository.name }}-${{ vars.ENV }} \
--network=${{ vars.DOCKER_NETWORK }} \
-e ENV="${{ vars.ENV }}" \
-e SECRET_KEY="${{ secrets.SECRET_KEY }}" \
-e DB_NAME="${{ secrets.DB_NAME }}" \
-e MONGODB_URI="${{ secrets.MONGODB_URI }}" \
-e ALLOWED_HOSTS="${{ vars.ALLOWED_HOSTS }}" \
-e GOOGLE_OAUTH_CLIENT_ID="${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}" \
-e GOOGLE_OAUTH_CLIENT_SECRET="${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}" \
-e GOOGLE_OAUTH_REDIRECT_URI="${{ vars.GOOGLE_OAUTH_REDIRECT_URI }}" \
-e PUBLIC_KEY="${{ secrets.PUBLIC_KEY }}" \
-e PRIVATE_KEY="${{ secrets.PRIVATE_KEY }}" \
-e ACCESS_LIFETIME="${{ vars.ACCESS_LIFETIME }}" \
-e REFRESH_LIFETIME="${{ vars.REFRESH_LIFETIME }}" \
-e ACCESS_TOKEN_COOKIE_NAME="${{ vars.ACCESS_TOKEN_COOKIE_NAME }}" \
-e REFRESH_TOKEN_COOKIE_NAME="${{ vars.REFRESH_TOKEN_COOKIE_NAME }}" \
-e COOKIE_DOMAIN="${{ vars.COOKIE_DOMAIN }}" \
-e COOKIE_SECURE="${{ vars.COOKIE_SECURE }}" \
-e COOKIE_HTTPONLY="${{ vars.COOKIE_HTTPONLY }}" \
-e COOKIE_SAMESITE="${{ vars.COOKIE_SAMESITE }}" \
-e TODO_BACKEND_BASE_URL="${{ vars.TODO_BACKEND_BASE_URL }}" \
-e TODO_UI_BASE_URL="${{ vars.TODO_UI_BASE_URL }}" \
-e TODO_UI_REDIRECT_PATH="${{ vars.TODO_UI_REDIRECT_PATH }}" \
-e CORS_ALLOWED_ORIGINS="${{ vars.CORS_ALLOWED_ORIGINS }}" \
-e SWAGGER_UI_PATH="${{ vars.SWAGGER_UI_PATH }}" \
-e ADMIN_EMAILS="${{ vars.ADMIN_EMAILS }}" \
-e POSTGRES_HOST="${{ secrets.POSTGRES_HOST }}" \
-e POSTGRES_PORT="${{ secrets.POSTGRES_PORT }}" \
-e POSTGRES_DB="${{ secrets.POSTGRES_DB }}" \
-e POSTGRES_USER="${{ secrets.POSTGRES_USER }}" \
-e POSTGRES_PASSWORD="${{ secrets.POSTGRES_PASSWORD }}" \
-e DUAL_WRITE_ENABLED="${{ vars.DUAL_WRITE_ENABLED }}" \
-e DUAL_WRITE_SYNC_MODE="${{ vars.DUAL_WRITE_SYNC_MODE }}" \
-e DUAL_WRITE_RETRY_ATTEMPTS="${{ vars.DUAL_WRITE_RETRY_ATTEMPTS }}" \
-e DUAL_WRITE_RETRY_DELAY="${{ vars.DUAL_WRITE_RETRY_DELAY }}" \
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
45 changes: 37 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,40 @@ on:
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: mongo:latest
ports:
- 27017:27017

if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}

env:
SECRET_KEY: "test-secret-key"
ALLOWED_HOSTS: "localhost,127.0.0.1"
MONGODB_URI: mongodb://db:27017
DB_NAME: todo-app
GOOGLE_OAUTH_CLIENT_ID: "test-client-id"
GOOGLE_OAUTH_CLIENT_SECRET: "test-client-secret"
GOOGLE_OAUTH_REDIRECT_URI: "http://localhost:8000/v1/auth/google/callback"
PRIVATE_KEY: "test-private-key"
PUBLIC_KEY: "test-public-key"
ACCESS_LIFETIME: "3600"
REFRESH_LIFETIME: "604800"
ACCESS_TOKEN_COOKIE_NAME: "todo-access"
REFRESH_TOKEN_COOKIE_NAME: "todo-refresh"
COOKIE_DOMAIN: "localhost"
COOKIE_SECURE: "False"
COOKIE_HTTPONLY: "True"
COOKIE_SAMESITE: "Lax"
TODO_UI_BASE_URL: "http://localhost:3000"
TODO_UI_REDIRECT_PATH: "dashboard"
TODO_BACKEND_BASE_URL: "http://localhost:8000"
CORS_ALLOWED_ORIGINS: "http://localhost:3000,http://localhost:8000"
ADMIN_EMAILS: "admin@example.com"
POSTGRES_HOST: "localhost"
POSTGRES_PORT: "5432"
POSTGRES_DB: "todo-app"
POSTGRES_USER: "test-user"
POSTGRES_PASSWORD: "test-password"
DUAL_WRITE_ENABLED: "True"
DUAL_WRITE_SYNC_MODE: "async"
DUAL_WRITE_RETRY_ATTEMPTS: "3"
DUAL_WRITE_RETRY_DELAY: "5"

steps:
- name: Checkout code
Expand All @@ -24,7 +49,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11.*'
python-version: "3.11.*"

- name: Install dependencies
run: |
Expand All @@ -34,6 +59,10 @@ jobs:
run: |
ruff check

- name: Format check
run: |
ruff format --check

- name: Run tests
run: |
python3.11 manage.py test
python3.11 manage.py test
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,7 @@ dmypy.json
cython_debug/

.ruff_cache
mongo_data
logs
/mongo_data
/logs

/postgres_data
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Remote Attach (Django in Docker)",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app"
}
],
"justMyCode": false,
"django": true,
"subProcess": false
}
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim-bookworm

# Set environment variables
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1

# Set the working directory in the container
WORKDIR /app
Expand Down
23 changes: 23 additions & 0 deletions README.Docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Docker Deployment Guide

### Building and running your application

When you're ready, start your application by running:
`docker compose up --build`.

Your application will be available at http://localhost:8000.

### Deploying your application to the cloud

First, build your image, e.g.: `docker build -t myapp .`.
If your cloud uses a different CPU architecture than your development
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
you'll want to build the image for that platform, e.g.:
`docker build --platform=linux/amd64 -t myapp .`.

Then, push it to your registry, e.g. `docker push myregistry.com/myapp`.

Consult Docker’s [getting started guide](https://docs.docker.com/go/get-started-sharing/) for more detail on building and pushing.

### References
* [Docker's Python guide](https://docs.docker.com/language/python/)
Loading