-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfileDocs
More file actions
38 lines (26 loc) · 856 Bytes
/
DockerfileDocs
File metadata and controls
38 lines (26 loc) · 856 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
29
30
31
32
33
34
35
36
37
38
# vim: filetype=dockerfile
# syntax=docker/dockerfile:1
ARG NODE_VERSION=22
FROM node:${NODE_VERSION}-slim as build
LABEL fly_launch_runtime="NodeJS"
WORKDIR /app
# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install -y python-is-python3 pkg-config build-essential curl
# Install pnpm
RUN npm install -g pnpm@latest
# Copy all repository files
COPY . .
# Install dependencies
RUN pnpm install
# Build the docs app using Turbo
RUN pnpm turbo run docs#build
# Final stage: Serve the static files with nginx
FROM nginx:alpine
# Copy the static files from the build stage
COPY --from=build /app/apps/docs/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/apps/docs/build /usr/share/nginx/html
# Expose the port nginx will listen on
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]