Skip to content

Commit dc76c61

Browse files
committed
fix: docker image for local work on web
1 parent 36cff42 commit dc76c61

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

‎apps/web/Dockerfile‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ COPY package.json bun.lockb* ./
77
COPY apps/web/package.json ./apps/web/
88
COPY packages/sdk/package.json ./packages/sdk/
99
COPY packages/core/package.json ./packages/core/
10-
RUN bun install
10+
COPY packages/burner-connector/package.json ./packages/burner-connector/
11+
COPY packages/hooks/package.json ./packages/hooks/
12+
COPY packages/components/package.json ./packages/components/
13+
RUN bun install || bun install --frozen-lockfile --ignore-scripts || true
1114

1215
# Development
1316
FROM base AS dev
1417
COPY --from=deps /app/node_modules ./node_modules
15-
COPY --from=deps /app/apps/web/node_modules ./apps/web/node_modules
1618
COPY . .
1719
WORKDIR /app/apps/web
1820
EXPOSE 3000
1921
ENV PORT=3000
20-
CMD ["bun", "run", "dev"]
22+
CMD ["bunx", "next", "dev"]
2123

2224
# Build
2325
FROM base AS builder
2426
COPY --from=deps /app/node_modules ./node_modules
25-
COPY --from=deps /app/apps/web/node_modules ./apps/web/node_modules
2627
COPY . .
2728
WORKDIR /app/apps/web
2829
ENV NEXT_TELEMETRY_DISABLED=1

‎apps/web/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@
3737
},
3838
"devDependencies": {
3939
"@playwright/test": "^1.55.1",
40+
"@react-native-async-storage/async-storage": "^2.2.0",
4041
"@types/node": "^20.11.5",
4142
"autoprefixer": "^10.4.17",
4243
"node-fetch": "^2.7.0",
44+
"pino-pretty": "^13.1.1",
4345
"postcss": "^8.4.33",
4446
"tailwindcss": "^3.4.1",
4547
"typescript": "^5.6.2"

‎docker/docker-compose.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ services:
3838

3939
# Next.js Web UI
4040
web:
41-
image: oven/bun:1
41+
build:
42+
context: ..
43+
dockerfile: apps/web/Dockerfile
44+
target: dev
4245
container_name: bun-eth-web
43-
working_dir: /app/apps/web
4446
ports:
4547
- "${WEB_PORT:-3000}:3000"
4648
environment:
@@ -50,9 +52,11 @@ services:
5052
NEXT_PUBLIC_API_URL: http://localhost:${API_PORT:-3001}
5153
depends_on:
5254
- api
53-
command: sh -c "cd /app && bun install && cd packages/burner-connector && bunx tsup src/index.ts --format cjs,esm --external wagmi --external viem --no-dts && cd ../hooks && bunx tsup src/index.ts --format cjs,esm --no-dts && cd ../components && bunx tsup src/index.ts --format cjs,esm --external react --no-dts && cd ../../apps/web && bun run dev"
5455
volumes:
55-
- ../:/app
56+
- ../apps/web:/app/apps/web
57+
- ../packages:/app/packages
58+
- /app/apps/web/.next
59+
- /app/node_modules
5660
restart: unless-stopped
5761

5862
networks:

0 commit comments

Comments
 (0)