iop/apps/client/Dockerfile
toki 7b90b7e5af refactor(chronos): IOP 경계를 분리한다
Chronos 이전 완료 증거를 보존하면서 IOP에는 provider 실행 책임만 남기기 위해 검토된 마일스톤 변경을 하나의 승격 커밋으로 고정한다.
2026-08-02 19:29:30 +09:00

35 lines
1.4 KiB
Docker

# syntax=docker/dockerfile:1
FROM ghcr.io/cirruslabs/flutter:stable AS builder
ARG IOP_CONTROL_PLANE_HTTP_URL=http://localhost:18000
ARG IOP_CONTROL_PLANE_WIRE_URL=ws://localhost:19080/client
WORKDIR /workspace/iop/apps/client
# docker-compose builds this Dockerfile with /config/workspace as context so the
# sibling path dependencies declared in pubspec.yaml resolve under /workspace.
# Copy manifests first so pub get can cache, then copy full sources before build.
COPY proto-socket/dart/pubspec.yaml /workspace/proto-socket/dart/
COPY nexo/packages/messaging_flutter/pubspec.yaml /workspace/nexo/packages/messaging_flutter/
COPY iop/packages/flutter/iop_console/pubspec.yaml /workspace/iop/packages/flutter/iop_console/
COPY iop/apps/client/pubspec.yaml iop/apps/client/pubspec.lock ./
RUN flutter pub get
COPY proto-socket/dart/ /workspace/proto-socket/dart/
COPY nexo/packages/messaging_flutter/ /workspace/nexo/packages/messaging_flutter/
COPY iop/packages/flutter/iop_console/ /workspace/iop/packages/flutter/iop_console/
COPY iop/apps/client/ ./
RUN flutter build web \
--release \
--dart-define=IOP_CONTROL_PLANE_HTTP_URL=$IOP_CONTROL_PLANE_HTTP_URL \
--dart-define=IOP_CONTROL_PLANE_WIRE_URL=$IOP_CONTROL_PLANE_WIRE_URL
FROM nginx:1.27-alpine AS runner
COPY --from=builder /workspace/iop/apps/client/build/web /usr/share/nginx/html
COPY iop/apps/client/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]