Skip to content

Commit

Permalink
⚡ wip: bootstrap api server
Browse files Browse the repository at this point in the history
  • Loading branch information
zcubbs committed Dec 22, 2023
1 parent f1134f5 commit c6dc22e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions build/Dockerfile.web
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Build stage
FROM node:lts-alpine AS build-stage
# node:alpine3.19
FROM node@sha256:9b54d010b382f0ef176dc93cd829bd4f2a905092b260746b3999aa824c9b7121 AS build-stage
WORKDIR /app
# Copy package.json and package-lock.json (or yarn.lock)
COPY web/start/package*.json ./
RUN npm install
# Copy the rest of your app's source code
COPY web/start/ .
RUN ls -l
RUN npm run build

# Production stage
FROM nginx:stable-alpine
COPY --from=build-stage /app/build /usr/share/nginx/html
COPY build/nginx.conf /etc/nginx/nginx.conf
# nginx:alpine3.18
FROM nginx@sha256:2d2a2257c6e9d2e5b50d4fbeb436d8d2b55631c2a89935a425b417eb95212686
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
RUN chown -R nginx:nginx /usr/share/nginx/html && \
chmod -R 755 /usr/share/nginx/html
USER nginx
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost/ || exit 1
CMD ["nginx", "-g", "daemon off;"]
2 changes: 1 addition & 1 deletion web/start/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="src/main.tsx"></script>
</body>
</html>
File renamed without changes.

0 comments on commit c6dc22e

Please sign in to comment.