mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-09 23:00:56 +00:00
add and implement install_app for worker image
This commit is contained in:
parent
97ec097870
commit
177ca58af6
13
build/common/worker/install_app.sh
Executable file
13
build/common/worker/install_app.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_NAME=${1}
|
||||
APP_REPO=${2}
|
||||
|
||||
cd /home/frappe/frappe-bench/
|
||||
|
||||
. env/bin/activate
|
||||
|
||||
cd apps
|
||||
|
||||
git clone --depth 1 -o upstream ${APP_REPO}
|
||||
pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/APP_NAME
|
@ -1,44 +1,3 @@
|
||||
FROM bitnami/python:latest-prod
|
||||
FROM frappe/frappe-worker:develop
|
||||
|
||||
RUN useradd -ms /bin/bash frappe
|
||||
WORKDIR /home/frappe/frappe-bench
|
||||
RUN install_packages \
|
||||
git \
|
||||
wkhtmltopdf \
|
||||
mariadb-client \
|
||||
gettext-base \
|
||||
wget \
|
||||
# for PDF
|
||||
libssl-dev \
|
||||
fonts-cantarell \
|
||||
xfonts-75dpi \
|
||||
xfonts-base \
|
||||
# For psycopg2
|
||||
libpq-dev \
|
||||
build-essential
|
||||
|
||||
# Install wkhtmltox correctly
|
||||
RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
|
||||
RUN dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb && rm wkhtmltox_0.12.5-1.stretch_amd64.deb
|
||||
|
||||
RUN mkdir -p apps logs commands
|
||||
|
||||
RUN virtualenv env \
|
||||
&& . env/bin/activate \
|
||||
&& cd apps \
|
||||
&& git clone --depth 1 -o upstream https://github.com/frappe/frappe \
|
||||
&& git clone --depth 1 -o upstream https://github.com/frappe/erpnext \
|
||||
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe \
|
||||
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/erpnext
|
||||
|
||||
COPY build/common/commands/* /home/frappe/frappe-bench/commands/
|
||||
COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template
|
||||
|
||||
# Setup docker-entrypoint
|
||||
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["start"]
|
||||
RUN install_app erpnext https://github.com/frappe/erpnext
|
@ -1,41 +1,3 @@
|
||||
FROM bitnami/python:latest-prod
|
||||
FROM frappe/frappe-worker:v11
|
||||
|
||||
RUN useradd -ms /bin/bash frappe
|
||||
WORKDIR /home/frappe/frappe-bench
|
||||
RUN install_packages \
|
||||
git \
|
||||
wkhtmltopdf \
|
||||
mariadb-client \
|
||||
gettext-base \
|
||||
wget \
|
||||
# for PDF
|
||||
libssl-dev \
|
||||
fonts-cantarell \
|
||||
xfonts-75dpi \
|
||||
xfonts-base
|
||||
|
||||
# Install wkhtmltox correctly
|
||||
RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
|
||||
RUN dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb && rm wkhtmltox_0.12.5-1.stretch_amd64.deb
|
||||
|
||||
RUN mkdir -p apps logs commands
|
||||
|
||||
RUN virtualenv env \
|
||||
&& . env/bin/activate \
|
||||
&& cd apps \
|
||||
&& git clone --depth 1 -o upstream https://github.com/frappe/frappe --branch version-11 \
|
||||
&& git clone --depth 1 -o upstream https://github.com/frappe/erpnext --branch version-11 \
|
||||
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe \
|
||||
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/erpnext
|
||||
|
||||
COPY build/common/commands/* /home/frappe/frappe-bench/commands/
|
||||
COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template
|
||||
|
||||
# Setup docker-entrypoint
|
||||
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["start"]
|
||||
RUN install_app erpnext https://github.com/frappe/erpnext
|
@ -1,44 +1,3 @@
|
||||
FROM bitnami/python:latest-prod
|
||||
FROM frappe/frappe-worker:v12
|
||||
|
||||
RUN useradd -ms /bin/bash frappe
|
||||
WORKDIR /home/frappe/frappe-bench
|
||||
RUN install_packages \
|
||||
git \
|
||||
wkhtmltopdf \
|
||||
mariadb-client \
|
||||
gettext-base \
|
||||
wget \
|
||||
# for PDF
|
||||
libssl-dev \
|
||||
fonts-cantarell \
|
||||
xfonts-75dpi \
|
||||
xfonts-base \
|
||||
# For psycopg2
|
||||
libpq-dev \
|
||||
build-essential
|
||||
|
||||
# Install wkhtmltox correctly
|
||||
RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
|
||||
RUN dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb && rm wkhtmltox_0.12.5-1.stretch_amd64.deb
|
||||
|
||||
RUN mkdir -p apps logs commands
|
||||
|
||||
RUN virtualenv env \
|
||||
&& . env/bin/activate \
|
||||
&& cd apps \
|
||||
&& git clone --depth 1 -o upstream https://github.com/frappe/frappe --branch version-12 \
|
||||
&& git clone --depth 1 -o upstream https://github.com/frappe/erpnext --branch version-12 \
|
||||
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe \
|
||||
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/erpnext
|
||||
|
||||
COPY build/common/commands/* /home/frappe/frappe-bench/commands/
|
||||
COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template
|
||||
|
||||
# Setup docker-entrypoint
|
||||
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["start"]
|
||||
RUN install_app erpnext https://github.com/frappe/erpnext
|
@ -36,6 +36,8 @@ COPY build/common/common_site_config.json.template /opt/frappe/common_site_confi
|
||||
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||
|
||||
COPY build/common/worker/install_app.sh /usr/local/bin/install_app
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
@ -33,6 +33,8 @@ COPY build/common/common_site_config.json.template /opt/frappe/common_site_confi
|
||||
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||
|
||||
COPY build/common/worker/install_app.sh /usr/local/bin/install_app
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
@ -36,6 +36,8 @@ COPY build/common/common_site_config.json.template /opt/frappe/common_site_confi
|
||||
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||
|
||||
COPY build/common/worker/install_app.sh /usr/local/bin/install_app
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench/sites
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
Loading…
Reference in New Issue
Block a user