-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add local refresh script (#198)
* feat: add local refresh script * docs: update Terraform docs * chore: remove cdn changes * chore: push lockfile * chore: update lockfile * docs: update Terraform docs * feat: add `FlushRedis` action * feat: add `openldap` to `compose.yaml` * fix: migrate to the new directory names * docs: clean up local setup * fix: abstract `ResetDatabase` bucket name into property --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7c38784
commit 4c597f5
Showing
14 changed files
with
1,268 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
sidebar_position: 20 | ||
--- | ||
|
||
# Local Setup | ||
|
||
## Before you start | ||
|
||
:::tip | ||
|
||
You can use the pre-configured devcontainers in the `.devcontainer` directory to get started quickly. | ||
|
||
::: | ||
|
||
You will need: | ||
|
||
- [Git](https://git-scm.com/) `git --version` | ||
- [Docker with Compose](https://docs.docker.com/manuals/) `docker -v` | ||
- [Node.js 20](https://nodejs.org/en/) `node -v` | ||
- [PHP 8.2](https://www.php.net/) `php -v` | ||
- [Composer](https://getcomposer.org/) `composer -V` | ||
- [AWS CLI](https://aws.amazon.com/cli/) `aws --version` | ||
|
||
## Getting started | ||
|
||
1. Clone the repository | ||
|
||
```bash | ||
git clone [email protected]:dvsa/vol-app.git | ||
``` | ||
|
||
1. Change into the project directory | ||
|
||
```bash | ||
cd vol-app | ||
``` | ||
|
||
:::warning | ||
|
||
If 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: | ||
|
||
```bash | ||
acp [profile] | ||
``` | ||
|
||
::: | ||
|
||
## Running the app | ||
|
||
1. Install the NPM dependencies in the root directory | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
1. Add DNS entries to your `/etc/hosts` file | ||
|
||
:::warning | ||
|
||
You only need to do this once. | ||
|
||
::: | ||
|
||
```bash | ||
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" >> /etc/hosts | ||
``` | ||
|
||
1. Start the application | ||
|
||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
1. Run the local setup script - this script will also as a local reset and is safe to run multiple times. | ||
|
||
:::info | ||
|
||
If this is the first time you are running the application, you will need to run all the steps. | ||
|
||
::: | ||
|
||
```bash | ||
npm run refresh | ||
``` | ||
|
||
:::success | ||
|
||
All done! | ||
|
||
Visit the application in your browser: - [Internal Application](http://iuweb.local.olcs.dev-dvsacloud.uk) - [Self Service Application](http://ssweb.local.olcs.dev-dvsacloud.uk) | ||
|
||
::: |
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.