Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix local setup #254

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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