Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw committed Feb 10, 2025
1 parent b9f3b83 commit 01f5127
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 63 deletions.
18 changes: 0 additions & 18 deletions Dockerfile.avatax.dev

This file was deleted.

48 changes: 26 additions & 22 deletions apps/avatax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,46 @@
<a href="https://twitter.com/getsaleor">🐦 Twitter</a>
</div>

## Documentation
## Running app locally in development containers

The easiest way of running Saleor for local development is to use [development containers](https://containers.dev/).
If you have Visual Studio Code follow their [guide](https://code.visualstudio.com/docs/devcontainers/containers#_quick-start-open-an-existing-folder-in-a-container) on how to open existing folder in container.

Development container only creates container, you still need to start the server. See [common-commands](#common-commands) section to learn more.

### Common commands

Running app in development server (from root of monorepo):

Visit [AvaTax App documentation](https://docs.saleor.io/docs/3.x/developer/app-store/apps/avatax/overview) to learn how to configure and develop the app locally.
```shell
pnpm run dev --filter=app-avatax
```

Running tests (from root of monorepo):

```shell
pnpm run test --filter=app-avatax
```

### DynamoDB
## DynamoDB

DynamoDB is used to store Client-side logs. To develop this feature locally:
DynamoDB is used to store Client-side logs. To develop this feature locally use development containers or use [docker-compose](../../.devcontainer/avatax/docker-compose.yml) from `.devcontainer`:

Check warning on line 44 in apps/avatax/README.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (devcontainer)

1. Run `docker compose up` for local DynamoDB instance
2. Run `bash scripts/setup-dynamodb.sh` to describe DynamoDB table
2. Run `bash setup-dynamodb.sh` to describe DynamoDB table

Ensure following env variables are set

```dotenv
FF_ENABLE_EXPERIMENTAL_LOGS=true
DYNAMODB_LOGS_ITEM_TTL_IN_DAYS=30
DYNAMODB_LOGS_TABLE_NAME=avatax-client-logs # must match scripts/setup-dynamodb.sh
```

Alternatively, you can connect to AWS-based DynamoDB:

1. Create table in your AWS, based on parameters in `scripts/setup-dynamodb.sh`
1. Create table in your AWS, based on parameters in `setup-dynamodb.sh`
2. Set AWS-specific [env variables](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html)

If `FF_ENABLE_EXPERIMENTAL_LOGS` is not set, you don't have to provide anything - feature will be disabled

## Testing

### E2E tests
Expand Down Expand Up @@ -119,7 +133,7 @@ PROMO_CODE=

The app has an example environment for `localhost` in `environments/localhost.bru`. You can copy it to bootstrap your own environment e.g `cloud.bru` (which will be ignored by git).

### Webhook migration scripts
## Webhook migration scripts

> [!NOTE]
> This section refers to apps hosted by Saleor or using REST APL. If you self host AvaTax app you need to write your own logic for updating migration scripts.
Expand All @@ -139,16 +153,6 @@ To start the migration run command:
pnpm migrate
```

### Running the app in docker

To run the app in docker, you need to build the image first (run this command in the root directory of the monorepo):

```shell
docker build --tag saleor-app-avatax-docker --file Dockerfile.avatax.dev .
```

Then you can run the image (run this command in the root directory of the monorepo):
## Documentation

```shell
docker run -p 3000:3000 --env-file apps/avatax/.env saleor-app-avatax-docker
```
Visit [AvaTax App documentation](https://docs.saleor.io/docs/3.x/developer/app-store/apps/avatax/overview) to learn how to configure the app.
12 changes: 0 additions & 12 deletions apps/avatax/docker-compose.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions apps/avatax/scripts/setup-dynamodb.sh

This file was deleted.

0 comments on commit 01f5127

Please sign in to comment.