Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions samples/vuejs/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Use Node runtime as base image
FROM node:20-alpine
# Use slim version of Node.js v20 on Debian Bookworm as base image
FROM node:20-bookworm-slim

# Install curl for healthchecks testing
RUN apt-get update -qq \
&& apt-get install -y curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Set working directory to /app
WORKDIR /app
Expand All @@ -8,7 +14,7 @@ WORKDIR /app
COPY package*.json ./

# Install dependencies
RUN npm install
RUN npm ci

# Copy the rest of your application's code
COPY . .
Expand All @@ -17,4 +23,4 @@ COPY . .
EXPOSE 5173

# Command to run the app when container is finished launch
CMD ["npm", "run", "dev"]
CMD ["npm", "run", "dev"]
11 changes: 11 additions & 0 deletions samples/vuejs/compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
app:
extends:
file: compose.yaml
service: app
ports:
- "5174:5173"
volumes:
- ./app:/app
- /app/node_modules
command: npm run dev
2 changes: 1 addition & 1 deletion samples/vuejs/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ services:
reservations:
memory: 512M
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:5173/"]
test: ["CMD", "curl", "-f", "http://localhost:5173/"]
Loading