make frappe and erpnext repo as environment variables

This commit is contained in:
Debian 2022-05-28 12:48:05 +00:00
parent 38ed43fc35
commit 7493e97b93
5 changed files with 12 additions and 7 deletions

View file

@ -1,8 +1,13 @@
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md
BENCH_REPO=https://github.com/frappe/bench.git
BENCH_BRANCH=develop
FRAPPE_REPO=https://github.com/frappe/frappe
FRAPPE_VERSION=v13.30.0
# Only with ERPNext override
ERPNEXT_REPO=https://github.com/frappe/erpnext
ERPNEXT_VERSION=v13.31.1
DB_PASSWORD=123

View file

@ -2,8 +2,8 @@ FROM debian:bullseye-slim as bench
LABEL author=frappé
ARG GIT_REPO=https://github.com/frappe/bench.git
ARG GIT_BRANCH=develop
ARG BENCH_REPO
ARG BENCH_BRANCH=develop
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
@ -97,7 +97,7 @@ RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
ENV PATH /home/frappe/.local/bin:$PATH
# Skip editable-bench warning
# https://github.com/frappe/bench/commit/20560c97c4246b2480d7358c722bc9ad13606138
RUN git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} .bench \
RUN git clone ${BENCH_REPO} --depth 1 -b ${BENCH_BRANCH} .bench \
&& pip install --user -e .bench \
&& echo "export PATH=/home/frappe/.local/bin:\$PATH" >>/home/frappe/.bashrc \
&& echo "export BENCH_DEVELOPER=1" >>/home/frappe/.bashrc

View file

@ -14,7 +14,7 @@ RUN mkdir -p sites/assets /out/assets \
&& echo frappe >sites/apps.txt
ARG FRAPPE_VERSION
ARG FRAPPE_REPO=https://github.com/frappe/frappe
ARG FRAPPE_REPO
# Install development node modules
RUN git clone --depth 1 -b ${FRAPPE_VERSION} ${FRAPPE_REPO} apps/frappe \
&& yarn --cwd apps/frappe \

View file

@ -1,7 +1,7 @@
FROM alpine/git as builder
ARG FRAPPE_VERSION
ARG FRAPPE_REPO=https://github.com/frappe/frappe
ARG FRAPPE_REPO
RUN git clone --depth 1 -b ${FRAPPE_VERSION} ${FRAPPE_REPO} /opt/frappe

View file

@ -42,7 +42,7 @@ RUN apt-get update \
FROM build_deps as frappe_builder
ARG FRAPPE_VERSION
ARG FRAPPE_REPO=https://github.com/frappe/frappe
ARG FRAPPE_REPO
RUN --mount=type=cache,target=/root/.cache/pip \
git clone --depth 1 -b ${FRAPPE_VERSION} ${FRAPPE_REPO} apps/frappe \
&& install-app frappe \
@ -55,7 +55,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
FROM frappe_builder as erpnext_builder
ARG ERPNEXT_VERSION
ARG ERPNEXT_REPO=https://github.com/frappe/erpnext
ARG ERPNEXT_REPO
RUN --mount=type=cache,target=/root/.cache/pip \
git clone --depth 1 -b ${ERPNEXT_VERSION} ${ERPNEXT_REPO} apps/erpnext \
&& install-app erpnext