Refactor project structure and update configurations for State Corp backend

- Updated project description in __init__.py
- Enhanced .gitignore to exclude additional data files
- Modified User model to remove first_name and last_name fields
- Improved instance save method in services.py to include updated_at field
- Added API tokens to .env.example for external services
- Cleaned up test files for better readability
- Updated Dockerfile and docker-compose.yml for improved setup
- Revised README.md to reflect project changes and added changelog
This commit is contained in:
2026-02-17 09:24:42 +01:00
parent e9d7f24aaa
commit fd2adf9ab4
31 changed files with 1419 additions and 933 deletions

View File

@@ -1,16 +1,14 @@
version: '3.8'
services:
db:
image: postgres:15.10
container_name: state_corp_db
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-project_dev}
POSTGRES_DB: ${POSTGRES_DB:-state_corp_dev}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./data/db:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
@@ -29,7 +27,7 @@ services:
ports:
- "6379:6379"
volumes:
- redis_data:/data
- ./data/redis:/data
networks:
- state_corp_network
healthcheck:
@@ -54,11 +52,12 @@ services:
- SECRET_KEY=${SECRET_KEY:-django-insecure-development-key}
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-project_dev}
- POSTGRES_DB=${POSTGRES_DB:-state_corp_dev}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./src:/app/src
- ./logs:/app/logs
@@ -88,11 +87,12 @@ services:
- DEBUG=${DEBUG:-True}
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-project_dev}
- POSTGRES_DB=${POSTGRES_DB:-state_corp_dev}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./src:/app/src
- ./logs:/app/logs
@@ -115,11 +115,12 @@ services:
- DEBUG=${DEBUG:-True}
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-project_dev}
- POSTGRES_DB=${POSTGRES_DB:-state_corp_dev}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./src:/app/src
- ./logs:/app/logs
@@ -127,10 +128,6 @@ services:
- state_corp_network
command: celery -A config beat --loglevel=info --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
postgres_data:
redis_data:
networks:
state_corp_network:
driver: bridge
driver: bridge