Skip to content

Commit

Permalink
fix: fix local setup (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense committed Aug 19, 2024
1 parent f793f01 commit 1fb834c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ services:
command: --log_bin_trust_function_creators=1 --sql_mode=NO_ENGINE_SUBSTITUTION
volumes:
- db-data:/var/lib/mysql
- ${OLCS_ETL_DIR:-../olcs-etl}:/var/lib/etl
ports:
- 3306:3306
environment:
Expand Down
14 changes: 13 additions & 1 deletion docs/app/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,20 @@ You will need:

1. Start the application

:::warning

The `olcs-etl` project needs to be mounted as a volume in the `db` container. By default, the directory is set to `../olcs-etl`.

You can customise this using the `OLCS_ETL_DIR` environment variable before running the `docker compose` command.

```sh
export OLCS_ETL_DIR=/path/to/olcs-etl
```

:::

```bash
docker-compose up -d
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.
Expand Down
4 changes: 2 additions & 2 deletions docs/infrastructure/docker/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Images are also pushed to the GitHub Container Registry (GHCR) for public access

:::

# Layers
# Image hierarchy

The VOL application images are built up of the following high-level layers:
The VOL application image hierarchy is as follows:

```mermaid
---
Expand Down
6 changes: 5 additions & 1 deletion packages/local-refresh/actions/ResetDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class ResetDatabase implements ActionInterface {
},
]);

if (!response["database-refresh"]) {
if (response["refresh-type"] === undefined) {
return false;
}

Expand All @@ -55,6 +55,10 @@ export default class ResetDatabase implements ActionInterface {
validate: (value) => (fs.existsSync(value) ? true : "Path does not exist"),
});

if (etlDirectoryPrompt.directory === undefined) {
return false;
}

cache.setKey("etlDirectory", etlDirectoryPrompt.directory);
cache.save();

Expand Down

0 comments on commit 1fb834c

Please sign in to comment.