2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 14:21:05 +00:00

Merge pull request #241 from frappe/develop

ERPNext v12.9.0 and Frappe v12.6.0
This commit is contained in:
Revant Nandgaonkar 2020-05-21 21:35:36 +05:30 committed by GitHub
commit bf56f90a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 27 deletions

View File

@ -8,12 +8,12 @@
"dockerComposeFile": "./docker-compose.yml",
"service": "frappe",
"workspaceFolder": "/workspace/development",
"shutdownAction": "stopCompose",
"extensions": [
"ms-python.python",
"auchenberg.vscode-browser-preview",
"grapecity.gc-excelviewer",
"mtxr.sqltools",
"visualstudioexptteam.vscodeintellicode"
]
"shutdownAction": "stopCompose",
"extensions": [
"ms-python.python",
"auchenberg.vscode-browser-preview",
"grapecity.gc-excelviewer",
"mtxr.sqltools",
"visualstudioexptteam.vscodeintellicode"
]
}

View File

@ -53,8 +53,8 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales
# 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 wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb
# Create new user with home directory, improve docker compatibility with UID/GID 1000, add user to sudo group, allow passwordless sudo, switch to that user and change directory to user home directory
RUN groupadd -g 1000 frappe
@ -63,8 +63,10 @@ RUN echo "frappe ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER frappe
WORKDIR /home/frappe
# Install bench in the local user home directory
RUN pip3 install --user git+https://github.com/frappe/bench.git#egg=bench --no-cache
# Clone and install bench in the local user home directory
# For development, bench source is located in ~/.bench
RUN git clone https://github.com/frappe/bench.git .bench \
&& pip3 install --user -e .bench
# Export python executables for Dockerfile
ENV PATH=/home/frappe/.local/bin:$PATH
@ -81,8 +83,8 @@ RUN bash -c "bench --version"
# https://nodejs.org/download/release/latest-v10.x/
# https://nodejs.org/download/release/latest-v12.x/
# https://nodejs.org/download/release/latest-v13.x/
ENV NODE_VERSION=12.16.1
ENV NODE_VERSION_FRAPPEV11=10.19.0
ENV NODE_VERSION=12.16.3
ENV NODE_VERSION_FRAPPEV11=10.20.1
# Install nvm with node
RUN wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh

View File

@ -18,8 +18,8 @@ RUN install_packages \
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 wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb
RUN mkdir -p apps logs commands /home/frappe/backups

View File

@ -15,8 +15,8 @@ RUN install_packages \
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 wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb
RUN mkdir -p apps logs commands /home/frappe/backups

View File

@ -18,8 +18,8 @@ RUN install_packages \
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 wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb
RUN mkdir -p apps logs commands /home/frappe/backups

View File

@ -18,8 +18,8 @@ RUN install_packages \
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 wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb
RUN mkdir -p apps logs commands /home/frappe/backups

View File

@ -26,7 +26,7 @@ cd frappe_docker
For most people getting started with Frappe development, the best solution is to use [ VSCode Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
VSCode should automatically inquiry you to install the required extensions, that can also be installed manually as follows:
VSCode should automatically inquire you to install the required extensions, that can also be installed manually as follows:
- Install Remote - Containers for VSCode
- through command line `code --install-extension ms-vscode-remote.remote-containers`
@ -84,23 +84,24 @@ sed -i '/redis/d' ./Procfile
You can create a new site with the following command:
```shell
bench new-site sitename
bench new-site sitename --no-mariadb-socket
```
for example:
```shell
bench new-site mysite.localhost
bench new-site mysite.localhost --no-mariadb-socket
```
The same command can be run non-interactively as well:
```shell
bench new-site mysite.localhost --mariadb-root-password 123 --admin-password admin
bench new-site mysite.localhost --mariadb-root-password 123 --admin-password admin --no-mariadb-socket
```
The command will ask the MariaDB root password. The default root password is `123`.
This will create a new site and a `mysite.localhost` directory under `frappe-bench/sites`.
The option `--no-mariadb-socket` will configure site's database credentials to work with docker.
You may need to configure your system /etc/hosts if you're on Linux, Mac, or its Windows equivalent.
### Set bench developer mode on the new site
@ -206,7 +207,8 @@ The first command can take a few seconds to be executed, this is to be expected.
### Fixing MariaDB issues after rebuilding the container
The `bench new-site` command creates a user in MariaDB with container IP as host, for this reason after rebuilding the container there is a chance that you will not be able to access MariaDB correctly with the previous configuration
For any reason after rebuilding the container if you are not be able to access MariaDB correctly with the previous configuration. Follow these instructions.
The parameter `'db_name'@'%'` needs to be set in MariaDB and permission to the site database suitably assigned to the user.
This step has to be repeated for all sites available under the current bench.