Add readme instructions for production build
This commit is contained in:
parent
2ff2329118
commit
1dcd42b6bc
1 changed files with 13 additions and 6 deletions
17
README.md
17
README.md
|
@ -13,11 +13,7 @@ $ sudo apt install git docker-compose
|
|||
|
||||
To install `docker`, follow the [official installation documentation](https://docs.docker.com/get-docker/). [Instructions are also available for `docker-compose`](https://docs.docker.com/compose/install/).
|
||||
|
||||
In order to recieve address data while running in development mode you will need to set an environment variable containing a valid linz data service api key. Such a key can be retrieved by signing up to https://data.linz.govt.nz/. One way of setting the variable is exporting it in the same terminal window that you will run the application. To do this please run the following command:
|
||||
|
||||
```bash
|
||||
export LINZ_API_KEY=<YOUR_API_KEY>
|
||||
```
|
||||
In order to recieve address data while running in development mode you will need to set an environment variable containing a valid linz data service api key. Such a key can be retrieved by signing up to https://data.linz.govt.nz/. One way of setting the variable is exporting it in the same terminal window that you will run the application. To do this please create a .env file in the root directory using `default.env` as an example. Fill in values as appropriate.
|
||||
|
||||
You may also need to give the `dev` script executable permissions using the following command:
|
||||
|
||||
|
@ -114,3 +110,14 @@ A summary of available commands are outlined below. Note that if the command req
|
|||
| `reset_database` | Removes, recreates and populates the database | No
|
||||
| `build` | Builds required images | No
|
||||
| `start` | Runs all services including the frontend, backend and postgres database | No
|
||||
| `build` | Builds required images (frontend and backend) for production | No
|
||||
| `start` | Runs all services in production mode including the frontend, backend and postgres database | No
|
||||
|
||||
## Running application for production
|
||||
|
||||
1. Ensure the prerequisites are met as defined in [#Initial Setup]
|
||||
2. Create an `.env` file (if not done prior) in the root directory using `default.env` as an example. Fill in the values as appropriate
|
||||
3. Update `frontend/config.js` with values as appropriate
|
||||
4. Run a production build using `./dev build_production`
|
||||
5. Initialise the database using `./dev init_database`
|
||||
6. Run the production application using `./dev start_production`
|
Loading…
Reference in a new issue