Skip to content

Commit d74f8b7

Browse files
committed
Add volumes
1 parent 5eb0088 commit d74f8b7

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ RUN corepack enable
88
RUN pnpm config set store-dir /home/node/.local/share/pnpm/store
99

1010
WORKDIR /app
11+
12+
COPY package.json pnpm-lock.yaml ./
13+
RUN pnpm install
14+
15+
RUN mkdir -p /app/src

docker-compose.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ services:
33
build:
44
context: .
55
dockerfile: Dockerfile
6-
entrypoint: ["bash", "-c"]
7-
command: ["pnpm install && pnpm run dev --host 0.0.0.0"]
8-
volumes:
9-
- .:/app
6+
command: ["pnpm", "run", "dev", "--host", "0.0.0.0"]
107
ports:
118
- "4321:4321"
129
environment:
1310
- ASTRO_TELEMETRY_DISABLED=1
11+
volumes:
12+
- .:/app
13+
- node_modules:/app/node_modules
14+
15+
volumes:
16+
node_modules:

0 commit comments

Comments
 (0)