-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile.web
More file actions
35 lines (21 loc) · 794 Bytes
/
Dockerfile.web
File metadata and controls
35 lines (21 loc) · 794 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
ARG NODE_VERSION=25.9.0
ARG ALPINE_VERSION=3.23
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS builder
ARG NPM_VERSION=11.12.1
WORKDIR /src/frontend
ARG SHOW_BLOG=true
ENV NEXT_PUBLIC_SHOW_BLOG=${SHOW_BLOG}
RUN npm install -g npm@${NPM_VERSION}
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM nginx:alpine
ARG APP_HOSTNAME=1time.io
ENV APP_HOSTNAME=${APP_HOSTNAME}
ENV NGINX_PORT=8080
COPY docker/nginx/default.conf.template /etc/nginx/templates/default.conf.template
COPY docker/nginx/40-rewrite-site-host.sh /docker-entrypoint.d/40-rewrite-site-host.sh
COPY --from=builder /src/frontend/build /usr/share/nginx/html
RUN chmod +x /docker-entrypoint.d/40-rewrite-site-host.sh
EXPOSE 8080