spejderneslejr.dk
This was the main website for Spejdernes Lejr 2017 and 2022. It has since been archived.
The project structure is based on drupal-composer/drupal-project
.
Development dependencies
Required
- Git
- Docker, Docker Compose and (on Mac/Windows) preferable Docker for Mac/Windows
- Task as a task-runener.
- Yarn We use a project-installed
Yarn 2 but you can keep your global Yarn on version 1 if you wish.
- Node 14, and/or NVM for administering the versions (we have .nvmrc files in the Drupal theme and API-server)
- Composer for local php development you
probably want a locally installed Composer
- The Platform.sh cli
Optional
- Some kind of development proxy that makes it easier to access your sites, dory
is recommended.
Initial setup
- Clone this repository and enter it.
- Authenticate against platform.sh:
platform login
- Verify that you have access:
platform info
Development workflow
We use Docker/docker-compose for running the development-instance of the site. Whenever available, you should always use task
over "raw" docker/docker-compose commands.
Web
- Branch off the master branch to prepare for development:
git checkout -b feature/myfeature
- Fetch a fresh database dump to ensure you are in sync with production:
task drupal:getdb
- Reset your local environment, this will give you a fresh site that should be very close to production:
task drupal:reset
- Build the jobs api (only needed if you actually develop on this part of the site):
task apps:build
- Access your site, on eg [spejderneslejr.docker]() if you're using Dory, or use
docker compose port web 80
to get the random port-mapping for the site.
- Develop your feature
Notice: A reset will throw away your current database, so make sure to persist eg. any config with drush cex
before resetting.
API development workflow
- Branch off the master branch to prepare for development:
git checkout -b feature/myfeature
- (initial use) copy
api/dist.env
to api/.env
and update it with credentials.
- Reset and start the api-server
task api:reset
- Develop your feature
Continuous Integration
The site is hosted on platform.sh, and all pull-request will create a temporary
test-environment where the change can be verified. The environment is destroyed
on merge.