forked from MeshAddicts/meshinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.spa
More file actions
33 lines (21 loc) · 810 Bytes
/
Dockerfile.spa
File metadata and controls
33 lines (21 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
29
30
31
32
33
FROM node:25.9.0-alpine AS build
LABEL org.opencontainers.image.source="https://github.com/MeshAddicts/meshinfo"
LABEL org.opencontainers.image.description="Realtime web UI to run against a Meshtastic regional or private mesh network."
WORKDIR /frontend
ARG env=production
ENV NODE_ENV=$env
RUN rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg \
&& npm install -g corepack \
&& corepack enable
COPY frontend/package.json frontend/yarn.lock frontend/.yarnrc.yml ./
COPY frontend/.yarn ./.yarn
RUN yarn install --immutable
COPY frontend/ ./
RUN yarn build --base=/
FROM caddy:2-alpine
COPY --from=build /frontend/dist /srv
COPY Caddyfile.frontend /etc/caddy/Caddyfile
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/docker-entrypoint.sh"]