mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-23 18:48:58 +00:00
fix: remove nunjucks from nginx image preparation
This commit is contained in:
parent
dcf0c0f8b1
commit
a3bdc3c8f9
@ -1,3 +1,7 @@
|
|||||||
|
# This image uses nvm and same base image as the worker image.
|
||||||
|
# This is done to ensures that node-sass binary remains common.
|
||||||
|
# node-sass is required to enable website theme feature used
|
||||||
|
# by Website Manager role in Frappe Framework
|
||||||
FROM bitnami/python:3.7-prod
|
FROM bitnami/python:3.7-prod
|
||||||
|
|
||||||
ENV NVM_DIR=/root/.nvm
|
ENV NVM_DIR=/root/.nvm
|
||||||
@ -21,9 +25,6 @@ RUN mkdir -p apps sites/assets/css \
|
|||||||
&& cd apps \
|
&& cd apps \
|
||||||
&& git clone --depth 1 https://github.com/frappe/frappe --branch $GIT_BRANCH
|
&& git clone --depth 1 https://github.com/frappe/frappe --branch $GIT_BRANCH
|
||||||
|
|
||||||
COPY build/frappe-nginx/generate_standard_style_css.js \
|
|
||||||
/home/frappe/frappe-bench/apps/frappe/generate_standard_style_css.js
|
|
||||||
|
|
||||||
COPY build/frappe-nginx/build.sh /build.sh
|
COPY build/frappe-nginx/build.sh /build.sh
|
||||||
RUN /build.sh
|
RUN /build.sh
|
||||||
RUN node --version \
|
RUN node --version \
|
||||||
|
@ -8,18 +8,10 @@ function nodeCleanUp() {
|
|||||||
cd /home/frappe/frappe-bench/apps/frappe
|
cd /home/frappe/frappe-bench/apps/frappe
|
||||||
yarn
|
yarn
|
||||||
yarn run production
|
yarn run production
|
||||||
# Remove this after python container starts using node command
|
|
||||||
yarn add nunjucks -D
|
|
||||||
|
|
||||||
if [[ "$GIT_BRANCH" =~ ^(version-12|version-11)$ ]]; then
|
if [[ "$GIT_BRANCH" =~ ^(version-12|version-11)$ ]]; then
|
||||||
nodeCleanUp
|
nodeCleanUp
|
||||||
else
|
else
|
||||||
node generate_standard_style_css.js \
|
|
||||||
frappe/website/doctype/website_theme/website_theme_template.scss > \
|
|
||||||
/home/frappe/standard_templates_string
|
|
||||||
node generate_bootstrap_theme.js \
|
|
||||||
/home/frappe/frappe-bench/sites/assets/css/standard_style.css \
|
|
||||||
"$(cat /home/frappe/standard_templates_string)"
|
|
||||||
nodeCleanUp
|
nodeCleanUp
|
||||||
# remove this when frappe framework moves this to dependencies from devDependencies
|
# remove this when frappe framework moves this to dependencies from devDependencies
|
||||||
yarn add node-sass
|
yarn add node-sass
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
const nunjucks = require("nunjucks");
|
|
||||||
|
|
||||||
const templatePath = process.argv[2];
|
|
||||||
const pathArray = templatePath.split("/");
|
|
||||||
const templateFile = pathArray.pop();
|
|
||||||
const templateDir = pathArray.join("/");
|
|
||||||
|
|
||||||
nunjucks.configure(templateDir);
|
|
||||||
const rendered = nunjucks.render(templateFile, {
|
|
||||||
button_rounded_corners: true,
|
|
||||||
font_properties: "300,600",
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(rendered.replace(/\n/gm, "\\n"));
|
|
Loading…
Reference in New Issue
Block a user