Skip to content

Commit 57166f0

Browse files
committed
.
1 parent 4230021 commit 57166f0

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

Dockerfile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Build stage
2-
FROM node:22-slim AS builder
1+
FROM node:22-slim
32

43
# Install build dependencies
54
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -26,17 +25,8 @@ COPY . .
2625
# Build the application
2726
RUN npm run build-only
2827

29-
# Production stage
30-
FROM nginx:alpine
28+
# Expose Vite preview port
29+
EXPOSE 4173
3130

32-
# Copy nginx configuration
33-
COPY nginx.conf /etc/nginx/conf.d/default.conf
34-
35-
# Copy built files from builder stage
36-
COPY --from=builder /app/dist /usr/share/nginx/html
37-
38-
# Expose port 80
39-
EXPOSE 80
40-
41-
# Start nginx
42-
CMD ["nginx", "-g", "daemon off;"]
31+
# Start Vite preview server
32+
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4173"]

k8s/deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
- name: bitbadges-explorer
1919
image: trevormil23/bitbadges-explorer:latest
2020
ports:
21-
- containerPort: 80
21+
- containerPort: 4173
2222
envFrom:
2323
- configMapRef:
2424
name: bitbadges-explorer-config
@@ -31,13 +31,13 @@ spec:
3131
memory: 2000Mi
3232
livenessProbe:
3333
httpGet:
34-
path: /health
35-
port: 80
34+
path: /
35+
port: 4173
3636
initialDelaySeconds: 30
3737
periodSeconds: 10
3838
readinessProbe:
3939
httpGet:
40-
path: /health
41-
port: 80
40+
path: /
41+
port: 4173
4242
initialDelaySeconds: 5
4343
periodSeconds: 5

0 commit comments

Comments
 (0)