You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Running linters and code checks](#running-linters-and-code-checks)
18
19
-[Running tests](#running-tests)
@@ -85,6 +86,50 @@ In a separate terminal window, run:
85
86
86
87
The application can be reached in your browser at `https://localhost:8000/`. The Django admin UI is accessible at `https://localhost:8000/admin` and the available API endpoints will be listed in the 404 information at `http://localhost:8000/api/pattern-service/v1/`.
87
88
89
+
### Development Configuration
90
+
91
+
The application uses dynaconf to manage configuration. Default development settings are defined in `development_defaults.py`. These include:
92
+
93
+
#### Database
94
+
95
+
By default, the application uses a local SQLite database:
96
+
97
+
```bash
98
+
# Default DB path
99
+
default_path = BASE_DIR / "db.sqlite3"
100
+
101
+
# Use environment variable if set, else default
102
+
env_path = os.getenv("SQLITE_PATH")
103
+
db_path = Path(env_path) if env_path else default_path
104
+
```
105
+
106
+
You can override the path by setting the `SQLITE_PATH` environment variable.
107
+
108
+
#### Ansible Automation Platform (AAP) Service Configuration
109
+
110
+
Default configuration values forconnecting to the AAP service are definedin`development_defaults.py`:
111
+
112
+
```bash
113
+
AAP_URL = "http://localhost:44926"# Base URL of your AAP instance
114
+
AAP_VALIDATE_CERTS = False # Whether to verify SSL certificates
115
+
AAP_USERNAME = "admin" # Username for AAP authentication
116
+
AAP_PASSWORD = "password" # Password for AAP authentication
117
+
```
118
+
119
+
*Note*: These defaults are placeholders forlocal development only. You must provide proper values for your environment by setting environment variables prefixed with `PATTERN_SERVICE_` or via a `.env` file.
This ensures secure and correct operation in your deployment or testing environment.
130
+
131
+
Dynaconf will prioritize environment variables and values in`.env` over defaults in`development_defaults.py`.
132
+
88
133
## Updating dependencies
89
134
90
135
Project dependencies forall environments are specifiedin the [pyproject.toml file](./pyproject.toml). A requirements.txt file is generated for each environment using pip-compile, to simplify dependency installation with pip.
0 commit comments