diff --git a/Dockerfile b/Dockerfile.dev similarity index 82% rename from Dockerfile rename to Dockerfile.dev index de337a79f..f95f6a4bc 100644 --- a/Dockerfile +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:20-slim AS base +FROM node:20.11-slim ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable @@ -11,5 +11,4 @@ RUN turbo prune app-avatax --docker RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --filter=app-avatax -# RUN pnpm dev --filter=app-avatax CMD ["pnpm", "dev", "--filter=app-avatax"] diff --git a/apps/avatax/README.md b/apps/avatax/README.md index 190a4c311..29bfc6fe1 100644 --- a/apps/avatax/README.md +++ b/apps/avatax/README.md @@ -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 +```