diff --git a/README.md b/README.md index 019517f..30fd7b5 100644 --- a/README.md +++ b/README.md @@ -63,60 +63,14 @@ Apply `initial_data.json` fixture. This action will erase all previous data: make loaddata ``` +*Default admin password for local development is `admin`.* + #### Run tests ```shell make tests ``` -### Using docker compose - -#### Step 1: Build - -```shell -docker compose -p django_atomic_transactions -f environment/docker compose.yml build -``` - -#### Step 2: Migrate - -Apply django migrations: - -```shell -docker compose -p django_atomic_transactions -f environment/docker compose.yml run --rm --service-ports web migrate -``` - -#### Step 3: Run service - -* **Runserver** - -Run django runserver command: - -```shell -docker compose -p django_atomic_transactions -f environment/docker compose.yml run --rm --service-ports web dev -``` - -* **Uvicorn** - -Run uvicorn server: - -```shell -docker compose -p django_atomic_transactions -f environment/docker compose.yml run --rm --service-ports web uvicorn -``` - -#### Step 4: Load sample data - -Apply `initial_data.json` fixture. This action will erase all previous data: - -```shell -docker compose -p django_atomic_transactions -f environment/docker compose.yml run --rm --service-ports web loaddata -``` - -#### Step 5: Run tests - -```shell -docker compose -p django_atomic_transactions -f environment/docker compose.yml run --rm --service-ports web python manage.py test --failfast api -``` - ## Know issues ### Database connection error: web service could not connect to db service diff --git a/environment/Dockerfile b/environment/Dockerfile index 326b863..3b0224a 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -1,6 +1,6 @@ # ---------- Base ---------- -FROM python:3.9.7-alpine3.14 AS base +FROM python:3.12.11-alpine3.22 AS base ENV PYTHONUNBUFFERED 1 diff --git a/src/django_atomic_transactions/settings.py b/src/django_atomic_transactions/settings.py index df4b2ec..eab1b12 100644 --- a/src/django_atomic_transactions/settings.py +++ b/src/django_atomic_transactions/settings.py @@ -1,6 +1,5 @@ import os - BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.environ.get('SECRET_KEY', '')