Public Access
1
0

feat: add docker deployment stack

Add container definitions for the web app, API, worker, and PostGIS database so the local stack can be built and run consistently.
This commit is contained in:
pguerrerox
2026-04-30 23:39:54 +00:00
parent d1363d6677
commit 2acfb1cdf5
3 changed files with 97 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
FROM node:22-alpine AS build
WORKDIR /app
ARG VITE_API_BASE_URL
ARG VITE_GOOGLE_MAPS_PLATFORM_KEY
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
ENV VITE_GOOGLE_MAPS_PLATFORM_KEY=$VITE_GOOGLE_MAPS_PLATFORM_KEY
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build && npm run build:api
FROM nginx:alpine AS web
COPY --from=build /app/dist /usr/share/nginx/html
FROM node:22-alpine AS api
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist-server ./dist-server
CMD ["node", "dist-server/server/src/index.js"]
FROM node:22-alpine AS worker
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist-server ./dist-server
CMD ["node", "dist-server/server/src/worker.js"]