mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-10 07:11:00 +00:00
parent
36f58c5937
commit
e6d80db704
@ -20,6 +20,7 @@ RUN pip install --no-cache-dir -U pip wheel \
|
||||
USER root
|
||||
|
||||
|
||||
|
||||
FROM base as build_deps
|
||||
|
||||
RUN apt-get update \
|
||||
@ -33,10 +34,10 @@ RUN apt-get update \
|
||||
gcc \
|
||||
g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER frappe
|
||||
|
||||
|
||||
|
||||
FROM build_deps as frappe_builder
|
||||
|
||||
ARG FRAPPE_VERSION
|
||||
@ -45,6 +46,7 @@ RUN git clone --depth 1 -b ${FRAPPE_VERSION} https://github.com/frappe/frappe ap
|
||||
&& rm -r apps/frappe/.git
|
||||
|
||||
|
||||
|
||||
# We split ERPNext wheels build in separate stage to achieve concurrency with Frappe build
|
||||
FROM build_deps as erpnext_wheels
|
||||
|
||||
@ -55,6 +57,7 @@ RUN git clone --depth 1 -b ${ERPNEXT_VERSION} https://github.com/frappe/erpnext
|
||||
RUN pip wheel --wheel-dir /home/frappe/erpnext-wheels -r apps/erpnext/requirements.txt
|
||||
|
||||
|
||||
|
||||
FROM frappe_builder as erpnext_builder
|
||||
|
||||
COPY --from=erpnext_wheels --chown=frappe /home/frappe/frappe-bench/apps/erpnext /home/frappe/frappe-bench/apps/erpnext
|
||||
@ -63,6 +66,7 @@ RUN --mount=type=bind,target=/home/frappe/erpnext-wheels,source=/home/frappe/erp
|
||||
env/bin/pip install --find-links=/home/frappe/erpnext-wheels --no-cache-dir -e apps/erpnext
|
||||
|
||||
|
||||
|
||||
FROM base as configured_base
|
||||
|
||||
RUN apt-get update \
|
||||
@ -84,7 +88,6 @@ RUN apt-get update \
|
||||
# other
|
||||
nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER frappe
|
||||
|
||||
COPY pretend-bench.sh /usr/local/bin/bench
|
||||
@ -94,9 +97,6 @@ COPY configure.py patched_bench_helper.py healthcheck.sh /usr/local/bin/
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
# TODO: Do volumes are being overwritten after copying from other stages?
|
||||
VOLUME [ "/home/frappe/frappe-bench/sites" ]
|
||||
|
||||
CMD [ "/home/frappe/frappe-bench/env/bin/gunicorn", "-b", "0.0.0.0:8000", "frappe.app:application", "--access-logfile", "-" ]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user