-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.frontend
More file actions
28 lines (18 loc) · 810 Bytes
/
Dockerfile.frontend
File metadata and controls
28 lines (18 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM node:20-slim AS build
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm ci --silent
COPY frontend/ ./
RUN DOCKER_BUILD=1 npm run build
FROM nginx:1.27-alpine
LABEL org.opencontainers.image.title="CloudShell Frontend" \
org.opencontainers.image.description="Self-hosted web SSH gateway — Nginx reverse proxy + static UI" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/iu2frl/CloudShell"
# Copy the React build artefact
COPY --from=build /app/frontend/dist /usr/share/nginx/html
# Copy our Nginx config (replaces the default)
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=5s --timeout=3s --start-period=5s --retries=5 \
CMD wget -qO /dev/null http://127.0.0.1/ || exit 1