-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1237 from Amsterdam/update/action
Initial commit
- Loading branch information
Showing
37 changed files
with
411 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,8 @@ DATABASE_USER=zaken | |
DATABASE_PASSWORD=insecure | ||
DATABASE_HOST=database | ||
DATABASE_PORT=5432 | ||
SENTRY_DSN=https://[email protected]/0 | ||
LOCAL_DEVELOPMENT_AUTHENTICATION=False | ||
LOGGING_LEVEL=WARNING # To prevent flooding the logging in local development. Default is DEBUG. | ||
LOCAL_DEVELOPMENT_AUTHENTICATION=True | ||
LOGGING_LEVEL=WARNING # To prevent flooding the logging in local development. Default is DEBUG. WARNING | ||
SECRET_KEY_TOP_ZAKEN=SECRET_KEY_TOP_ZAKEN | ||
SECRET_KEY_TON_ZAKEN=SECRET_KEY_TON_ZAKEN | ||
BELASTING_API_URL=https://api-acc.belastingen.centric.eu/bel/inn/afne/vora/v1/vorderingenidentificatienummer/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git revert --no-commit f1c30cb2e2fd0d3bd0d865ec86e8b7546aa91d2e..HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,38 +53,52 @@ docker-compose -f docker-compose.local.yml up | |
|
||
To create all necessary credentials run the following command: | ||
|
||
``` | ||
```bash | ||
bash bin/setup_credentials.sh | ||
``` | ||
|
||
This will create superuser admin account with the following credentials | ||
|
||
``` | ||
```bash | ||
email: [email protected] | ||
password: admin | ||
password: insecure | ||
``` | ||
|
||
Visit the Admin at http://localhost:8080/admin/ | ||
|
||
Check the health page to see if all services are up and running: | ||
http://localhost:8080/health | ||
|
||
To create all necessary user groups run the following command: | ||
|
||
```bash | ||
bash bin/setup_user_groups.sh | ||
``` | ||
|
||
## Running tests | ||
|
||
Set LOCAL_DEVELOPMENT_AUTHENTICATION environment variable to True (default) | ||
|
||
Run unit tests locally with: | ||
|
||
``` | ||
docker compose run --rm zaak-gateway python manage.py test | ||
```bash | ||
docker compose -f docker-compose.local.yml run --rm zaak-gateway python manage.py test | ||
``` | ||
|
||
To run tests for a specific module, add a path: | ||
|
||
```bash | ||
docker compose -f docker-compose.local.yml run --rm zaak-gateway python manage.py test apps/cases | ||
|
||
``` | ||
docker compose run --rm zaak-gateway python manage.py test apps/cases | ||
|
||
Or a specific test: | ||
|
||
```bash | ||
docker-compose -f docker-compose.local.yml exec -T zaak-gateway python manage.py test apps.addresses.tests.tests_models.AddressModelTest.test_can_create_address_with_bag_result_without_stadsdeel | ||
``` | ||
|
||
|
||
## API documentation (Swagger) | ||
|
||
You can access the documentation at: | ||
|
@@ -105,24 +119,25 @@ Create a `.env.local` file, on the root of your project, and override the variab | |
|
||
Start your project with the newly created environment variables, like so: | ||
|
||
``` | ||
docker compose --env-file .env.local up | ||
```bash | ||
docker compose -f docker-compose.local.yml --env-file .env.local up | ||
``` | ||
|
||
## Enabling Keycloak authentication for a locally run zaken-frontend | ||
|
||
Set LOCAL_DEVELOPMENT_AUTHENTICATION environment variable to False | ||
Set `LOCAL_DEVELOPMENT_AUTHENTICATION` environment variable to False | ||
|
||
## Generating Mock Data | ||
|
||
You can generate mock data easily (from the API swagger environment) by executing the /api/v1/generate-mock/ GET request. | ||
You can generate mock data easily (from the API swagger environment) by executing the `/api/v1/generate-mock/` GET request. | ||
|
||
## Update fixtures | ||
|
||
Generate new fixtures json file: | ||
|
||
``` | ||
docker-compose run --rm zaak-gateway python manage.py dumpdata --indent 2 -o temp_fixture.json [app_name] | ||
```bash | ||
docker compose -f docker-compose.local.yml run --rm zaak-gateway python manage.py dumpdata --indent 2 -o temp_fixture.json [app_name] | ||
|
||
``` | ||
|
||
Now manually copy changes you need to the corresponding fixtures file. | ||
|
@@ -131,13 +146,13 @@ Now manually copy changes you need to the corresponding fixtures file. | |
|
||
You can add pre-commit hooks for checking and cleaning up your changes: | ||
|
||
``` | ||
```bash | ||
bash bin/install_pre_commit.sh | ||
``` | ||
|
||
You can also run the following command to ensure all files adhere to coding conventions: | ||
|
||
``` | ||
```bash | ||
bash bin/cleanup_pre_commit.sh | ||
``` | ||
|
||
|
@@ -167,7 +182,7 @@ Note that the apps and models should be updated whenever applications and models | |
|
||
For changes to the model you have to migrate the DB. | ||
|
||
```python | ||
```bash | ||
python manage.py makemigrations --name <name_of_your_migration> <name_of_apps> | ||
|
||
python manage.py migrate | ||
|
@@ -193,14 +208,14 @@ Try the online modeler for BPMN-models: https://bpmn.io/. This is a lightweight | |
|
||
Clone the bpmn-io Github repo for editing: https://github.com/bpmn-io/bpmn-js-examples. | ||
|
||
``` | ||
```bash | ||
git clone [email protected]:bpmn-io/bpmn-js-examples.git | ||
``` | ||
|
||
If you'd like to use Camunda Platform execution related properties, include the camunda-bpmn-moddle dependency which tells the modeler about camunda:XXX extension properties: https://github.com/bpmn-io/bpmn-js-examples/tree/master/properties-panel#camunda-platform | ||
|
||
Follow next steps: | ||
``` | ||
```bash | ||
cd bpmn-js-examples | ||
|
||
cd properties-panel | ||
|
@@ -265,7 +280,7 @@ So if you think existing cases will get stuck in the model, just create a new ve | |
|
||
Example: `housing_corporation` has a new minor version model and the latest version was `5.0.0` but `debrief` has latest version `6.0.0`. Then the new minor version of `housing_corporation` will be `6.1.0`. | ||
|
||
``` | ||
```json | ||
bpmn_models/default/ | ||
├─ debrief/ | ||
│ ├─ 0.1.0/ | ||
|
@@ -280,7 +295,7 @@ bpmn_models/default/ | |
|
||
- Add the new version to `WORKFLOW_SPEC_CONFIG` in `settings.py`: | ||
|
||
```python | ||
```json | ||
"housing_corporation": { | ||
"versions": { | ||
"5.0.0": {}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM amsterdam/python:3.9-buster | ||
LABEL maintainer="[email protected]" | ||
FROM python:3.10-bullseye | ||
|
||
ENV REQUESTS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt | ||
|
||
|
@@ -10,11 +9,16 @@ RUN chmod 644 /usr/local/share/ca-certificates/adp_rootca.crt \ | |
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN apt-get update && apt-get install -y | ||
# RUN pip install --upgrade pip | ||
RUN pip install uwsgi | ||
# Update and install necessary packages including GDAL | ||
RUN apt-get update && apt-get install -y \ | ||
gdal-bin \ | ||
libgdal-dev \ | ||
graphviz \ | ||
graphviz-dev \ | ||
postgresql-client | ||
|
||
RUN apt-get install graphviz graphviz-dev -y | ||
RUN pip install --upgrade pip | ||
RUN pip install uwsgi | ||
RUN pip install pygraphviz | ||
|
||
RUN echo "10.240.5.72 acc.api.data.amsterdam.nl" >> /etc/hosts || echo "Could not write to /etc/hosts" | ||
|
@@ -30,6 +34,8 @@ RUN chmod +x /app/wait-for.sh | |
RUN chmod +x /app/celery.sh | ||
RUN chmod +x /app/deploy/docker-entrypoint.sh | ||
|
||
# Set the GDAL_LIBRARY_PATH environment variable | ||
ENV GDAL_LIBRARY_PATH /usr/lib/libgdal.so | ||
|
||
ENTRYPOINT ["/app/deploy/docker-entrypoint.sh"] | ||
CMD ["uwsgi", "--ini", "/app/deploy/config.ini"] |
Oops, something went wrong.