Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Update from pc
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Jan 6, 2020
1 parent b5a8ef3 commit 1cb83b2
Show file tree
Hide file tree
Showing 40 changed files with 2,286 additions and 1,158 deletions.
15 changes: 7 additions & 8 deletions api/.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

MERCURE_SUBSCRIBE_URL=http://localhost:1337/hub
VARNISH_URL=http://ac-cache-proxy

###> conduction/commonground-bundle ###
MERCURE_SUBSCRIBE_URL=http://localhost:1337/hub
Expand All @@ -23,13 +21,14 @@ CONDUCTION_COMMONGROUND_BAG_APIKEY=!ChangeMe!
###< conduction/commonground-bundle ###

###> symfony/framework-bundle ###
APP_TITLE='Contacten Catalogus (CC)'
APP_VERSION=0.0.1
APP_ENV=dev
#APP_ENV=dev
#APP_VERSION=0.0.1
#APP_TITLE='Proto Component (PC)'
#APP_NAME='pc'
APP_DESCRIPTION='Naast deze JSON rest API is er ook een [graphql](/graphql) interface beschikbaar.'
APP_SECRET=!ChangeMe!
TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
TRUSTED_HOSTS='^localhost|api$'
#TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(.+\.)?localhost|api$'
###< symfony/framework-bundle ###

###> symfony/framework-bundle ###
Expand All @@ -41,7 +40,7 @@ HUBSPOT_EMBED_CODE=6108438
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=postgres://api-platform:!ChangeMe!@db/api?serverVersion=10.1
# DATABASE_URL=postgres://api-platform:!ChangeMe!@dev-db/api?serverVersion=10.1
###< doctrine/doctrine-bundle ###

###> nelmio/cors-bundle ###
Expand Down
8 changes: 8 additions & 0 deletions api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
"guzzlehttp/guzzle": "^6.3",
"knplabs/knp-markdown-bundle": "^1.8",
"lexik/jwt-authentication-bundle": "^2.6",
"phpdocumentor/reflection-docblock": "^4.3",
"ramsey/uuid": "^3.8",
"ramsey/uuid-doctrine": "^1.5",
"sensio/framework-extra-bundle": "^5.5",
"sensiolabs/security-checker": "^6.0",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/console": "4.3.*",
"symfony/dotenv": "4.3.*",
Expand Down Expand Up @@ -62,5 +65,10 @@
"allow-contrib" : false,
"require" : "4.4.*"
}
},
"scripts": {
"auto-scripts": {
"security-checker security:check": "script"
}
}
}
69 changes: 34 additions & 35 deletions api/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 27 additions & 3 deletions api/config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ parameters:
# environment variables are not available yet.
# You should not need to change this value.
env(VARNISH_URL): ''
env(APP_VERSION): ''
env(APP_VERSION): '
env(APP_NAME): '''
env(APP_TITLE): ''
env(APP_DESCRIPTION): ''
env(APP_REPRO): ''
env(APP_DEMO): ''
env(APP_ENV): ''
env(AUTH_ENABLED): ''
env(AUDITTRAIL_ENABLED): ''
env(NOTIFICATION_ENABLED): ''
env(HEALTH_ENABLED): ''
env(ARCHIVE_ENABLED): ''
env(CONTAINER_REGISTRY_BASE): ''
env(CONTAINER_PROJECT_NAME): ''
env(CONTAINER_REPRO): ''

api_platform:
mapping:
Expand All @@ -27,6 +36,7 @@ api_platform:
- Docker Image: [online](%env(CONTAINER_REPRO)%)
- Datamodel: [postman](/schema/%env(APP_NAME)%.postman_collection.json) / [oas](/schema/openapi.yaml) / [pdf](/schema/datamodel.pdf) / [mwb](/schema/datamodel.mwb)
%env(APP_DESCRIPTION)%
version: '%env(APP_VERSION)%'

Expand All @@ -36,7 +46,7 @@ api_platform:
enable_re_doc: true

# In the NL api strategie we use snake case for naming
name_converter: 'Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter'
# name_converter: 'Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter'

# Lets confirm to JSON-HA: first, as per common ground. But allow other serializers
formats:
Expand All @@ -47,4 +57,18 @@ api_platform:
xml: ['application/xml']
yaml: ['application/x-yaml']
csv: ['text/csv']
html: ['text/html']
html: ['text/html']

# Varnish integration, remove if unwanted
# http_cache:
# invalidation:
# enabled: true
# varnish_urls: ['%env(VARNISH_URL)%']
# max_age: 0
# shared_max_age: 3600
# vary: ['Content-Type', 'Authorization']
# public: true

# Mercure integration, remove if unwanted
# mercure:
# hub_url: '%env(MERCURE_SUBSCRIBE_URL)%'
15 changes: 11 additions & 4 deletions api/config/packages/common_ground.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@ parameters:
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(CONDUCTION_COMMONGROUND_BAG_APIKEY): 'Change me your .env file'
env(CONDUCTION_COMMONGROUND_BAG_APIKEY): 'Change me in your .env file'
env(NLX_OUTWAY): true
env(NLX_INWAY): false
common_ground.bag.location: 'https://bag.basisregistraties.overheid.nl/api/v1/'
common_ground.bag.apikey: 'e8a95365-3078-4b41-990a-e3de43cecd36'
common_ground.oas.type: tool
common_ground.oas.type: service
common_ground.oas.host: irc.zaakonline.nl
common_ground.oas.servers:
-
description: Demo Omgeving
url: 'http://cc.zaakonline.nl'
url: 'http://proto.demo.common-ground.dev'
common_ground.oas.externalDocs:
-
description: OAS Documentatie
url: 'http://cc.zaakonline.nl'
url: 'http://proto.demo.common-ground.dev'
common_ground.oas.developers:
-
name: Conduction
url: https://github.com/ConductionNL
email: [email protected]
-
name: Gemeente 's-Hertogenbosch
url: https://github.com/gemeenteshertogenbosch
email: [email protected]/
-
name: Gemeente Utrecht
url: https://github.com/GemeenteUtrecht
Expand Down
8 changes: 8 additions & 0 deletions api/config/packages/security_checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true

SensioLabs\Security\SecurityChecker: null

SensioLabs\Security\Command\SecurityCheckerCommand: null
3 changes: 3 additions & 0 deletions api/config/packages/sensio_framework_extra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sensio_framework_extra:
router:
annotations: false
2 changes: 1 addition & 1 deletion api/docker/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server {
# Comment the next line and uncomment the next to enable dynamic resolution (incompatible with Kubernetes)
fastcgi_pass php:9000;
#resolver 127.0.0.11;
#set $upstream_host cc-php;
#set $upstream_host commonground-php;
#fastcgi_pass $upstream_host:9000;

fastcgi_split_path_info ^(.+\.php)(/.*)$;
Expand Down
Loading

0 comments on commit 1cb83b2

Please sign in to comment.