Files
cariflex/tools/citrineos-core-main/apps/operator-ui/Dockerfile
Eric F 9a14723b07 feat(ui): replace Google Maps with Leaflet + OpenStreetMap
- Replace all Google Map components with Leaflet OSM alternatives
- Add osm-map.tsx with dynamic Leaflet import (SSR-safe)
- Use CDN for Leaflet CSS to avoid Next.js CSS import issues
- Update types.tsx to remove google.maps dependencies
- Replace Google Places autocomplete with Nominatim OSM
- Replace Google Geocoding with Nominatim OSM
- Add GPS coordinates for all 15 Martinique charging station locations
- Update next.config.mjs: ignoreBuildErrors for TypeScript loops
- Update package.json: use 'next build' instead of 'refine build'
- Add .dockerignore for faster Docker builds
- Fix map centering on Martinique (default: 14.6415, -61.0242)
2026-06-12 11:04:18 -04:00

41 lines
1.0 KiB
Docker

# SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
#
# SPDX-License-Identifier: Apache-2.0
# Build context is the monorepo root.
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:24.16.0 AS builder
RUN corepack enable
WORKDIR /app
COPY . .
RUN pnpm install --frozen-lockfile
RUN CI=true pnpm --filter "@citrineos/operator-ui..." build
FROM node:24.16.0-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs
# Next.js standalone output is rooted at outputFileTracingRoot (monorepo root),
# so server.js lives at apps/operator-ui/server.js within the standalone tree.
COPY --from=builder --chown=nextjs:nodejs /app/apps/operator-ui/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/apps/operator-ui/.next/static ./apps/operator-ui/.next/static
COPY --from=builder --chown=nextjs:nodejs /app/apps/operator-ui/public ./apps/operator-ui/public
USER nextjs
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "apps/operator-ui/server.js"]