Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerでの環境整備 #10

Open
terapyon opened this issue Sep 30, 2023 · 0 comments
Open

Dockerでの環境整備 #10

terapyon opened this issue Sep 30, 2023 · 0 comments

Comments

@terapyon
Copy link
Member

terapyon commented Sep 30, 2023

DockerfileをClasicのものを使って準備

https://github.com/plone/plone-backend/blob/v6.0.7/Dockerfile.classicui

# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.11
ARG PLONE_VERSION=6.0
FROM plone/server-builder:${PLONE_VERSION} as builder

# Remove Volto support from builder image
RUN /app/bin/pip uninstall -y plone.volto

FROM plone/server-prod-config:${PLONE_VERSION}

LABEL maintainer="Plone Community <[email protected]>" \
      org.label-schema.name="plone-classicui" \
      org.label-schema.description="Plone $PLONE_VERSION Classic UI image using Python $PYTHON_VERSION" \
      org.label-schema.vendor="Plone Foundation"

# Use /app as the workdir
WORKDIR /app

# Copy /app from builder
COPY --from=builder --chown=500:500 /app /app

# Link /data (the exposed volume) into /app/var
RUN ln -s /data /app/var

# Setup default type for site creation to be classic
ENV TYPE=classic
# https://github.com/pypa/pip/issues/12079
ENV _PIP_USE_IMPORTLIB_METADATA=0

実行コマンド

% docker build . -t plone-llm-test --platform linux/amd64
% docker run -it -p 8080:8080 -v ./data:/data plone-llm-test start

dataディレクトリに、永続化される。

開発用の実行コマンド

% docker run -it -p 8080:8080 -v ${PWD}/data:/data -v ${PWD}/src:/app/src -e DEVELOP="/app/src/c2.search.llm"  plone-llm-test start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant