mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 17:15:08 +00:00
Use assets builder in custom_app tutorial
This commit is contained in:
parent
7dc7ba97f6
commit
1c8f93796b
1 changed files with 3 additions and 20 deletions
|
|
@ -1,22 +1,5 @@
|
|||
ARG FRAPPE_VERSION
|
||||
FROM node:14-bullseye-slim as prod_node_modules
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
||||
git \
|
||||
build-essential \
|
||||
python \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /root/frappe-bench
|
||||
RUN mkdir -p sites/assets
|
||||
|
||||
ARG FRAPPE_VERSION
|
||||
RUN git clone --depth 1 -b ${FRAPPE_VERSION} https://github.com/frappe/frappe apps/frappe
|
||||
|
||||
RUN yarn --cwd apps/frappe
|
||||
|
||||
FROM frappe/assets-builder:${FRAPPE_VERSION} as prod_node_modules
|
||||
|
||||
ARG APP_NAME
|
||||
COPY . apps/${APP_NAME}
|
||||
|
|
@ -34,13 +17,13 @@ ARG APP_NAME
|
|||
RUN yarn --cwd apps/${APP_NAME}
|
||||
|
||||
# Build assets
|
||||
RUN echo "frappe\n${APP_NAME}" >sites/apps.txt \
|
||||
RUN echo "frappe\nerpnext\n${APP_NAME}" >sites/apps.txt \
|
||||
&& yarn --cwd apps/frappe production --app ${APP_NAME} \
|
||||
&& rm sites/apps.txt
|
||||
|
||||
|
||||
|
||||
FROM frappe/frappe-nginx:${FRAPPE_VERSION}
|
||||
FROM frappe/erpnext-nginx:${FRAPPE_VERSION}
|
||||
|
||||
ARG APP_NAME
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue