-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue/django setup configuration tokens (#135)
* [maykinmedia/objects-api#481] Fix requirements * [maykinmedia/objects-api#481] Move config folder in setup_configuration * [maykinmedia/objects-api#481] Config in settings * [maykinmedia/objects-api#481] Update model with migrations * [maykinmedia/objects-api#481] Black * [maykinmedia/objects-api#481] Create test_authenticaton tests * [maykinmedia/objects-api#481] Create test_validators * [maykinmedia/objects-api#481] Fix models and migrations * [maykinmedia/objects-api#481] Fix tests * [maykinmedia/objects-api#481] Delete utils * [maykinmedia/objects-api#481] Add factory * [maykinmedia/objects-api#481] Create step and model * [maykinmedia/objects-api#481] Create tests * [maykinmedia/objects-api#481] Fix old tests * [maykinmedia/objects-api#481] Update command line * [maykinmedia/objects-api#481] Remove old settings * [maykinmedia/objects-api#481] Add configuration file for docker * [maykinmedia/objects-api#481] Fix docker-compose * [maykinmedia/objects-api#481] Flake8 * [maykinmedia/objects-api#481] Create command tests and delete old tests * [maykinmedia/objects-api#481] Fix setup_configuration * [maykinmedia/objects-api#481] Fix requirements * [maykinmedia/objects-api#481] Fix requirements * [maykinmedia/objects-api#481] Fix data.yaml * [maykinmedia/objects-api#481] Fix base settings * [maykinmedia/objects-api#481] Fix docker-compose file * [maykinmedia/objects-api#481] Replace build_step_config_from_sources with execute_single_step * [maykinmedia/objects-api#481] Fix Sites tests * [maykinmedia/objects-api#481] Improve Site tests * [maykinmedia/objects-api#481] Improve Token tests * [maykinmedia/objects-api#481] Black * [maykinmedia/objects-api#481] Add test for empty token * [maykinmedia/objects-api#481] Copy migration test * [maykinmedia/objects-api#481] Fix migration tests * [maykinmedia/objects-api#481] Fix django-setup-configuration version in base.in * [maykinmedia/objects-api#481] Fix docstring * [maykinmedia/objects-api#481] Change file_name * [maykinmedia/objects-api#481] Fix name objecttypes_sites_config_enable * [maykinmedia/objects-api#481] Fix name objecttypes_sites_config_enable 2 * [maykinmedia/objects-api#481] Remove tests for call_command * [maykinmedia/objects-api#481] Change env variables in docker-compose * [maykinmedia/objects-api#481] Split in directories * [maykinmedia/objects-api#481] Fix paths * [maykinmedia/objects-api#481] Update name for SitesConfiguration * [maykinmedia/objects-api#481] Update namespace for Site * [maykinmedia/objects-api#481] Update namespace for TokenAuthConfiguration * [maykinmedia/objects-api#481] Remove Field from ConfigurationModel * [maykinmedia/objects-api#481] Update INSTALL.rst * [maykinmedia/objects-api#481] Fix tests * [maykinmedia/objects-api#481] Remove unnecessary volumes in docker * [maykinmedia/objects-api#481] Change namespace * [maykinmedia/objects-api#481] Change namespace in file * [maykinmedia/objects-api#481] Change namespace zgw_tokens_tokenauth * Revert "[maykinmedia/objects-api#481] Change namespace zgw_tokens_tokenauth" This reverts commit a2c9c59. * [maykinmedia/objects-api#481] Fix unnecessary "loop" for one element * [maykinmedia/objects-api#481] Fix INSTALL.rst * [maykinmedia/objects-api#481] Add link to repo in INSTALL.rst * [maykinmedia/objects-api#481] Fix token tests * [maykinmedia/objects-api#481] Change name validate_no_whitespace * [maykinmedia/objects-api#481] Remove unused validation control * [maykinmedia/objects-api#481] Black * [maykinmedia/objects-api#481] Add warning if list is empty * [maykinmedia/objects-api#481] Add validate_no_empty + tests
- Loading branch information
1 parent
b3958cd
commit 6fb512e
Showing
41 changed files
with
1,094 additions
and
534 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
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ services: | |
db: | ||
image: postgres:12-alpine | ||
environment: | ||
- POSTGRES_USER=objecttypes | ||
- POSTGRES_PASSWORD=objecttypes | ||
POSTGRES_USER: objecttypes | ||
POSTGRES_PASSWORD: objecttypes | ||
command: postgres -c max_connections=300 -c log_min_messages=LOG | ||
|
||
redis: | ||
|
@@ -13,33 +13,37 @@ services: | |
image: maykinmedia/objecttypes-api:latest | ||
build: . | ||
environment: &app-env | ||
- DB_USER=objecttypes | ||
- DB_PASSWORD=objecttypes | ||
- DJANGO_SETTINGS_MODULE=objecttypes.conf.docker | ||
- SECRET_KEY=${SECRET_KEY:-fgv=c0hz&tl*8*3m3893@m+1pstrvidc9e^5@fpspmg%cyf15d} | ||
- ALLOWED_HOSTS=* | ||
- CACHE_DEFAULT=redis:6379/0 | ||
- CACHE_AXES=redis:6379/0 | ||
- DISABLE_2FA=yes | ||
- SUBPATH=${SUBPATH:-/} | ||
# setup_configuration env vars | ||
- SITES_CONFIG_ENABLE=yes | ||
- OBJECTTYPES_DOMAIN=web:8000 | ||
- OBJECTTYPES_ORGANIZATION=ObjectTypes | ||
- OBJECTS_OBJECTTYPES_CONFIG_ENABLE=yes | ||
- OBJECTS_OBJECTTYPES_TOKEN=some-random-string | ||
- OBJECTS_OBJECTTYPES_PERSON=Some Person | ||
- [email protected] | ||
DB_USER: objecttypes | ||
DB_PASSWORD: objecttypes | ||
DJANGO_SETTINGS_MODULE: objecttypes.conf.docker | ||
SECRET_KEY: ${SECRET_KEY:-fgv=c0hz&tl*8*3m3893@m+1pstrvidc9e^5@fpspmg%cyf15d} | ||
ALLOWED_HOSTS: '*' | ||
CACHE_DEFAULT: redis:6379/0 | ||
CACHE_AXES: redis:6379/0 | ||
DISABLE_2FA: yes | ||
SUBPATH: ${SUBPATH:-/} | ||
volumes: | ||
- log:/app/log | ||
ports: | ||
- 8000:8000 | ||
depends_on: | ||
web-init: | ||
condition: service_completed_successfully | ||
|
||
web-init: | ||
image: maykinmedia/objecttypes-api:latest | ||
build: . | ||
environment: *app-env | ||
environment: | ||
<<: *app-env | ||
# | ||
# Django-setup-configuration | ||
RUN_SETUP_CONFIG: ${RUN_SETUP_CONFIG:-true} | ||
command: /setup_configuration.sh | ||
volumes: | ||
- log:/app/log | ||
- ./docker/setup_configuration:/app/setup_configuration | ||
depends_on: | ||
- db | ||
- db | ||
|
||
volumes: | ||
db: | ||
log: |
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,16 @@ | ||
tokenauth_config_enable: true | ||
tokenauth: | ||
items: | ||
- identifier: token-1 | ||
token: 18b2b74ef994314b84021d47b9422e82b685d82f | ||
contact_person: Person 1 | ||
email: [email protected] | ||
organization: Organization 1 | ||
application: Application 1 | ||
administration: Administration 1 | ||
|
||
sites_config_enable: true | ||
sites_config: | ||
items: | ||
- domain: example.com | ||
name: example |
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
Oops, something went wrong.