A drupal backend that exposes projects created with an API.
@TODO
Setup Docker environment:
docker-compose up -dSetup local site configuration:
cp web/sites/default/_docker.settings.local.php web/sites/default/docker.settings.local.phpInstall php packages:
docker-compose exec phpfpm composer installInstall site:
docker-compose exec phpfpm vendor/bin/drush site-install minimal --existing-config --yesSign in as admin:
docker-compose exec phpfpm vendor/bin/drush --uri=http://$(docker-compose port nginx 80) user:loginSee Symfony Local Web Server for details.
docker-compose up -d
symfony composer install
symfony php vendor/bin/drush site-install minimal --existing-config --yes
symfony local:server:start --daemon
# Update the uri to the actual address of the running web server.
symfony php vendor/bin/drush --uri=https://127.0.0.1:8000 user:loginadmin/config/services/openapi/redoc/jsonapiCreate the file web/sites/default/services.yml with the following content:
parameters:
# Configure Cross-Site HTTP requests (CORS).
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
# for more information about the topic in general.
# Note: By default the configuration is disabled.
cors.config:
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: ['content-type', 'authorization']
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: ['GET']
# Configure requests allowed from specific origins.
allowedOrigins: ['*']
# Sets the Access-Control-Expose-Headers header.
exposedHeaders: false
# Sets the Access-Control-Max-Age header.
maxAge: false
# Sets the Access-Control-Allow-Credentials header.
supportsCredentials: false