Skip to content
Draft
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
4 changes: 3 additions & 1 deletion .devcontainer/avatax/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ services:
build:
context: ../..
dockerfile: .devcontainer/avatax/Dockerfile
extra_hosts:
- "localhost:host-gateway"
volumes:
- "../..:/app"
- "pnpm-store:/app/.pnpm-store"

dynamodb:
image: "amazon/dynamodb-local:latest"
ports:
- 8000:8000
- "8000"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change that I think we should also change scripts to setup dynamodb - currently they are requiring localhost:8000 - maybe we should globally change that to e.g 6667 or something similar?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm good idea, I'll use a single port, so that it doesn't conflict with Saleor + works with our scripts

volumes:
- "dynamodb-data:/home/dynamodblocal/data"
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath /home/dynamodblocal/data"
Expand Down
16 changes: 16 additions & 0 deletions apps/avatax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ The development container will have two ports opened:
1. `3000` - where the AvaTax app dev server will listen for requests
2. `8000` - where the local DynamoDB will listen for requests and allow [NoSQL Workbench for DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.html) to connect

### Running with local Saleor instance

> [!NOTE]
> This section assumes that your Docker engine supports `host-gateway` to resolve IP address of host machine.
> Read more in [Docker documentation](https://docs.docker.com/reference/cli/docker/container/run/#add-host)

To install the app in local Saleor instance make sure that you:
- Set `HTTP_IP_FILTER_ALLOW_LOOPBACK_IPS=True` env variable in your Saleor
- Set these values in app `.env` file:
```bash
APP_IFRAME_BASE_URL=http://localhost:3000
APP_API_BASE_URL=http://localhost:3000
```

After this you can install app in Saleor using `http://localhost:3000/api/manifest` as the app manifest URL.

### Common commands

Running the app in development server:
Expand Down
Loading