Compare commits
2
Commits
f0ad8481c4
...
564975d0e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
564975d0e3 | ||
|
|
0bd901e890 |
No files matched your search
@@ -6,3 +6,4 @@ coverage/
|
|||||||
*.log
|
*.log
|
||||||
.env*
|
.env*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
.aider*
|
||||||
+7
-5
@@ -6,8 +6,9 @@ FROM node:22-alpine AS builder
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies first (layer caching)
|
# Install dependencies first (layer caching)
|
||||||
COPY package.json ./
|
COPY package.json bun.lock ./
|
||||||
RUN npm install
|
RUN npm install -g bun
|
||||||
|
RUN bun install
|
||||||
|
|
||||||
# Copy application source code
|
# Copy application source code
|
||||||
COPY . .
|
COPY . .
|
||||||
@@ -17,7 +18,7 @@ ARG VITE_GOOGLE_MAPS_API_KEY=""
|
|||||||
ENV VITE_GOOGLE_MAPS_API_KEY=$VITE_GOOGLE_MAPS_API_KEY
|
ENV VITE_GOOGLE_MAPS_API_KEY=$VITE_GOOGLE_MAPS_API_KEY
|
||||||
|
|
||||||
# Build production bundle (Vite client + server.cjs)
|
# Build production bundle (Vite client + server.cjs)
|
||||||
RUN npm run build
|
RUN bun run build
|
||||||
|
|
||||||
# ========================================================
|
# ========================================================
|
||||||
# Stage 2: Serve full-stack application (API + SPA) with Node.js
|
# Stage 2: Serve full-stack application (API + SPA) with Node.js
|
||||||
@@ -29,8 +30,9 @@ ENV NODE_ENV=production
|
|||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
|
|
||||||
# Install production dependencies only
|
# Install production dependencies only
|
||||||
COPY package.json ./
|
COPY package.json bun.lock ./
|
||||||
RUN npm install --omit=dev && npm cache clean --force
|
RUN npm install -g bun
|
||||||
|
RUN bun install --production
|
||||||
|
|
||||||
# Copy built bundle from builder stage
|
# Copy built bundle from builder stage
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
pinpoint-golf:
|
pinpoint-golf:
|
||||||
build:
|
build:
|
||||||
@@ -12,7 +10,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
# Map host port 3000 to app port 3000
|
# Map host port 3000 to app port 3000
|
||||||
- "3000:3000"
|
- "127.0.0.1:3000:3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- PORT=3000
|
- PORT=3000
|
||||||
|
|||||||
Reference in new issue
Block a user