mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-08 14:21:05 +00:00
parent
6bfd1f926e
commit
ba68887e40
@ -68,17 +68,23 @@ bench init --skip-redis-config-generation frappe-bench
|
|||||||
cd frappe-bench
|
cd frappe-bench
|
||||||
```
|
```
|
||||||
|
|
||||||
For version 13 use Python 3.9 by passing option to `bench init` command,
|
To setup frappe framework version 14 bench set `PYENV_VERSION` environment variable to `3.10.5` (default) and use NodeJS version 14 (default),
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
bench init --skip-redis-config-generation --frappe-branch version-13 --python python3.9 frappe-bench
|
# Use default environments
|
||||||
|
bench init --skip-redis-config-generation --frappe-branch version-14 frappe-bench
|
||||||
|
# Or set environment versions explicitly
|
||||||
|
nvm use v16
|
||||||
|
PYENV_VERSION=3.10.5 bench init --skip-redis-config-generation --frappe-branch version-14 frappe-bench
|
||||||
|
# Switch directory
|
||||||
cd frappe-bench
|
cd frappe-bench
|
||||||
```
|
```
|
||||||
|
|
||||||
For version 12 use Python 3.7 by passing option to `bench init` command,
|
To setup frappe framework version 13 bench set `PYENV_VERSION` environment variable to `3.9.9` and use NodeJS version 14,
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
bench init --skip-redis-config-generation --frappe-branch version-12 --python python3.7 frappe-bench
|
nvm use v14
|
||||||
|
PYENV_VERSION=3.9.9 bench init --skip-redis-config-generation --frappe-branch version-13 frappe-bench
|
||||||
cd frappe-bench
|
cd frappe-bench
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -98,6 +98,8 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
|
|||||||
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
|
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
|
||||||
&& pyenv install $PYTHON_VERSION_V13 \
|
&& pyenv install $PYTHON_VERSION_V13 \
|
||||||
&& pyenv install $PYTHON_VERSION \
|
&& pyenv install $PYTHON_VERSION \
|
||||||
|
&& PYENV_VERSION=$PYTHON_VERSION_V13 pip install virtualenv \
|
||||||
|
&& PYENV_VERSION=$PYTHON_VERSION pip install virtualenv \
|
||||||
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_v13 \
|
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_v13 \
|
||||||
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
|
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
|
||||||
&& echo 'eval "$(pyenv init --path)"' >>~/.profile \
|
&& echo 'eval "$(pyenv init --path)"' >>~/.profile \
|
||||||
@ -114,12 +116,15 @@ RUN git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} .bench \
|
|||||||
&& echo "export BENCH_DEVELOPER=1" >>/home/frappe/.bashrc
|
&& echo "export BENCH_DEVELOPER=1" >>/home/frappe/.bashrc
|
||||||
|
|
||||||
# Install Node via nvm
|
# Install Node via nvm
|
||||||
ENV NODE_VERSION=14.18.1
|
ENV NODE_VERSION_14=14.19.3
|
||||||
|
ENV NODE_VERSION=16.18.0
|
||||||
ENV NVM_DIR /home/frappe/.nvm
|
ENV NVM_DIR /home/frappe/.nvm
|
||||||
ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}
|
ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}
|
||||||
|
|
||||||
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
|
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
|
||||||
&& . ${NVM_DIR}/nvm.sh \
|
&& . ${NVM_DIR}/nvm.sh \
|
||||||
|
&& nvm install ${NODE_VERSION_14} \
|
||||||
|
&& nvm use v${NODE_VERSION_14} \
|
||||||
&& npm install -g yarn \
|
&& npm install -g yarn \
|
||||||
&& nvm install ${NODE_VERSION} \
|
&& nvm install ${NODE_VERSION} \
|
||||||
&& nvm use v${NODE_VERSION} \
|
&& nvm use v${NODE_VERSION} \
|
||||||
|
Loading…
Reference in New Issue
Block a user