mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-26 03:27:31 +00:00
e1e1c6b6f9
erpnext-assets - ERPNext nginx config + static assets erpnext-worker - ERPNext python environment frappe-assets - Frappe nginx config + static assets frappe-worker - Frappe python environment frappe-socketio - Frappe socketio process common for apps
37 lines
1.2 KiB
Docker
37 lines
1.2 KiB
Docker
FROM bitnami/node:12-prod
|
|
|
|
WORKDIR /home/frappe/frappe-bench
|
|
COPY sites/apps.txt /home/frappe/frappe-bench/sites/apps.txt
|
|
|
|
RUN install_packages git
|
|
|
|
RUN mkdir -p apps sites/assets \
|
|
&& cd apps \
|
|
&& git clone --depth 1 https://github.com/frappe/frappe
|
|
|
|
RUN cd /home/frappe/frappe-bench/apps/frappe \
|
|
&& yarn \
|
|
&& yarn run production \
|
|
&& rm -fr node_modules \
|
|
&& yarn install --production=true
|
|
|
|
RUN git clone --depth 1 https://github.com/frappe/bench /tmp/bench \
|
|
&& mkdir -p /var/www/error_pages \
|
|
&& cp -r /tmp/bench/bench/config/templates /var/www/error_pages
|
|
|
|
RUN cp -R /home/frappe/frappe-bench/apps/frappe/frappe/public/* /home/frappe/frappe-bench/sites/assets/frappe \
|
|
&& cp -R /home/frappe/frappe-bench/apps/frappe/node_modules /home/frappe/frappe-bench/sites/assets/frappe/
|
|
|
|
FROM nginx:latest
|
|
COPY --from=0 /home/frappe/frappe-bench/sites /var/www/html/
|
|
COPY --from=0 /var/www/error_pages /var/www/
|
|
COPY nginx-default.conf.template /etc/nginx/conf.d/default.conf.template
|
|
COPY docker-entrypoint.sh /
|
|
|
|
RUN apt-get update && apt-get install -y rsync && apt-get clean
|
|
|
|
VOLUME [ "/assets" ]
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"]
|