mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-12-22 03:48:29 +00:00
28 lines
1.2 KiB
Docker
28 lines
1.2 KiB
Docker
# This a dev image for testing your plugin when installed into the Baserow backend image
|
|
FROM baserow/backend:1.30.1 as base
|
|
|
|
FROM baserow/backend:1.30.1
|
|
|
|
USER root
|
|
|
|
ARG PLUGIN_BUILD_UID
|
|
ENV PLUGIN_BUILD_UID=${PLUGIN_BUILD_UID:-9999}
|
|
ARG PLUGIN_BUILD_GID
|
|
ENV PLUGIN_BUILD_GID=${PLUGIN_BUILD_GID:-9999}
|
|
|
|
# If we aren't building as the same user that owns all the files in the base
|
|
# image/installed plugins we need to chown everything first.
|
|
COPY --from=base --chown=$PLUGIN_BUILD_UID:$PLUGIN_BUILD_GID /baserow /baserow
|
|
RUN groupmod -g $PLUGIN_BUILD_GID baserow_docker_group && usermod -u $PLUGIN_BUILD_UID $DOCKER_USER
|
|
|
|
# Install your dev dependencies manually.
|
|
COPY --chown=$PLUGIN_BUILD_UID:$PLUGIN_BUILD_GID ./plugins/{{ cookiecutter.project_module }}/backend/requirements/dev.txt /tmp/plugin-dev-requirements.txt
|
|
RUN . /baserow/venv/bin/activate && pip3 install -r /tmp/plugin-dev-requirements.txt
|
|
|
|
COPY --chown=$PLUGIN_BUILD_UID:$PLUGIN_BUILD_GID ./plugins/{{ cookiecutter.project_module }}/ $BASEROW_PLUGIN_DIR/{{ cookiecutter.project_module }}/
|
|
RUN /baserow/plugins/install_plugin.sh --folder $BASEROW_PLUGIN_DIR/{{ cookiecutter.project_module }} --dev
|
|
|
|
USER $PLUGIN_BUILD_UID:$PLUGIN_BUILD_GID
|
|
ENV DJANGO_SETTINGS_MODULE='baserow.config.settings.dev'
|
|
CMD ["django-dev"]
|