Skip to content

Commit

Permalink
Add Dockerfile for avatax app dev mode (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored May 22, 2024
1 parent 3eaa452 commit 43e396a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20.11.1-alpine
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

COPY . .

RUN pnpm install --global turbo

RUN turbo prune app-avatax --docker

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --filter=app-avatax

CMD ["pnpm", "dev", "--filter=app-avatax"]
14 changes: 14 additions & 0 deletions apps/avatax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,17 @@ To start the migration run command:
```bash
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.dev .
```

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

```shell
docker run -p 3000:3000 --env-file apps/avatax/.env saleor-app-avatax-docker
```
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"apps/*/e2e/data/**",
"**/*.bru",
"**/.eslintrc",
".github/**"
".github/**",
"Dockerfile*"
]
}

0 comments on commit 43e396a

Please sign in to comment.