Local Setup
Before you start
You can use the pre-configured devcontainers in the .devcontainer
directory to get started quickly.
You will need:
- Git
git --version
- Docker with Compose
docker -v
- Node.js 20
node -v
- PHP 8.2
php -v
- Composer
composer -V
- AWS CLI
aws --version
Getting started
-
Clone the repository
git clone git@github.com:dvsa/vol-app.git
-
Change into the project directory
cd vol-app
warningIf you are resetting the database you will need to be be authenticated with the AWS VOL
nonprod
account.If you have the ZSH AWS plugin installed & configured, you can run the following command to get temporary credentials:
acp [profile]
Running the app
-
Install the NPM dependencies in the root directory
npm install
-
Add DNS entries to your
/etc/hosts
filewarningYou only need to do this once.
sudo echo "127.0.0.1 iuweb.local.olcs.dev-dvsacloud.uk ssweb.local.olcs.dev-dvsacloud.uk api.local.olcs.dev-dvsacloud.uk cdn.local.olcs.dev-dvsacloud.uk mailpit.local.olcs.dev-dvsacloud.uk" >> /etc/hosts
-
Start the application
warningThe
olcs-etl
project needs to be mounted as a volume in thedb
container. By default, the directory is set to../olcs-etl
.You can customise this using the
OLCS_ETL_DIR
environment variable before running thedocker compose
command.export OLCS_ETL_DIR=/path/to/olcs-etl
docker compose up -d
-
Run the local setup script - this script will also as a local reset and is safe to run multiple times.
infoIf this is the first time you are running the application, you will need to run all the steps.
npm run refresh
All done!
You can visit the application in your browser:
Any email sent by the app can be viewed via: Mailpit
Logging in
The local dataset has a number of different users that you can log in as.
The default password for all users while using LDAP is Password1
.
Selfserve
Username | Role |
---|---|
usr542 | Operator - User |
usr543 | Operator - Transport Manager |
usr611 | Operator - Admin |
usr612 | Operator - Admin |
usr778 | Partner - Admin |
usr779 | Partner - Admin |
usr1964 | Partner - User |
usr1965 | Partner - User |
usr20131 | Local Authority administrator |
usr20132 | Local Authority user |
Internal
Username | Role |
---|---|
usr20 | Case worker |
usr21 | Case worker |
usr59 | Admin |
usr273 | Admin |
usr291 | System Admin |
usr322 | Admin |
usr331 | Limited read only |
usr342 | Limited read only |
usr455 | Admin |
usr528 | Read only |
usr529 | Read only |
usr1071 | Admin |
usr29431 | IRHP Admin |
usr36047 | Admin |
usr39158 | Admin |
usr68648 | Admin |
usr73852 | Admin |
usr76189 | Admin |
usr76754 | Admin |
In the event that the local dataset changes, the above tables can be reproduced using the SQL:
SELECT u.login_id, r.description, IF(u.team_id IS NULL, "Selfserve", "Internal") as tenant FROM user u JOIN user_role ur ON u.id = ur.user_id JOIN role r ON r.id = ur.role_id;