Skip to content

Commit

Permalink
test: update docker testing (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkfb authored Feb 22, 2024
1 parent f025e3e commit 1bc0549
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,5 @@ FROM node:bullseye
RUN mkdir /app
WORKDIR /app

COPY package-lock.json /app
COPY package.json /app
COPY *.ts /app/
COPY src /app/src
RUN npm ci

COPY .storybook /app/.storybook

EXPOSE 6006
CMD [ "npm", "run", "storybook"]
5 changes: 2 additions & 3 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ services:
image: velo.gl
build: .
volumes:
- /app/node_modules
- ".:/app:ro"
- ".:/app:rw"
ports:
- "6006:6006"
healthcheck:
Expand All @@ -19,5 +18,5 @@ services:
storybook:
condition: service_healthy
command: >
sh -c "npx playwright install-deps
sh -c "npm ci && npx playwright install-deps
&& npm run test:storybook -- --url http://storybook:6006/"
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ services:
image: velo.gl
build: .
volumes:
- /app/node_modules
- ".:/app:ro"
- ".:/app:rw"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"build": "rm -rf dist && tsc",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"docker:storybook": "docker run --rm -it --mount type=bind,source=\"$(pwd)\"/sample,target=/app/sample,readonly $(docker build -q .)",
"docker:storybook": "docker run --rm -it --user \"$UID\" --mount type=bind,source=\"$(pwd)\",target=/app $(docker build -q .)",
"docker:compose:storybook": "docker-compose up --build",
"docker:compose:test": "docker-compose -f docker-compose.test.yml up --build",
"lint:typecheck": "tsc --project tsconfig.lint.json --noEmit",
Expand Down

0 comments on commit 1bc0549

Please sign in to comment.