2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 14:50:58 +00:00

Update README.md

This commit is contained in:
vishalseshagiri 2017-07-24 16:41:51 +05:30 committed by GitHub
parent 16ac6e1a5d
commit 8764181929

View File

@ -24,34 +24,40 @@ A step by step series of examples that tell you have to get a development env ru
Follow the steps given in [here](https://docs.docker.com/engine/installation) Follow the steps given in [here](https://docs.docker.com/engine/installation)
The Docker version used by us is Docker version 17.06.0-ce, build 02c1d87 Docker version 17.06.0-ce, build 02c1d87
- Installing docker-compose(only for Linux users).Docker for Mac, Docker for Windows, and Docker Toolbox include Docker Compose - Installing docker-compose(only for Linux users).Docker for Mac, Docker for Windows, and Docker Toolbox include Docker Compose
Follow the steps given in [here](https://docs.docker.com/compose/install/) Follow the steps given in [here](https://docs.docker.com/compose/install/)
The docker-compose version used by us is docker-compose version 1.14.0, build c7bdf9e docker-compose version 1.14.0, build c7bdf9e
#### 2. Build the container and install bench #### 2. Build the container and install bench
* Make sure your logged in as root. Build the container and install bench inside the container as a **non root** user * Make sure your logged in as root. Build the container and install bench inside the container as a **non root** user
This command requests the user to enter a password for the MySQL root user, please remember it for future use.
This command also builds the 3 linked containers docker-frappe, mariadb and redis which are required by frappe,
It creates a user frappe inside the docker-frappe container, whose working directory is /home/frappe. It also clones
the bench-repo from [here](https://github.com/frappe/bench)
source build-container.sh source build-container.sh
Note: Please do not remove the bench directory the above commands will create Note: Please do not remove the bench directory the above commands will create
#### Basic Usage #### Basic Usage
* Starting docker containers 1. Starting docker containers
This command can be used to start containers This command can be used to start containers
docker-compose start docker-compose start
* Accessing the frappe container via CLI 2. Accessing the frappe container via CLI
./start-container.sh ./start-container.sh
* Create a new bench 3. Create a new bench
The init command will create a bench directory with frappe framework The init command will create a bench directory with frappe framework
installed. It will be setup for periodic backups and auto updates once installed. It will be setup for periodic backups and auto updates once
@ -59,45 +65,46 @@ A step by step series of examples that tell you have to get a development env ru
bench init frappe-bench && cd frappe-bench bench init frappe-bench && cd frappe-bench
* Set the db host for bench(points bench to the mariadb container) 4. Set the db host for bench(points bench to the mariadb container)
bench set-mariadb-host mariadb bench set-mariadb-host mariadb
* Add a site(make sure your current path is /home/frappe/frappe-bench) 5. Add a site(make sure your current path is /home/frappe/frappe-bench)
Frappe apps are run by frappe sites and you will have to create at least one Frappe apps are run by frappe sites and you will have to create at least one
site. The new-site command allows you to do that. site. The new-site command allows you to do that.
bench new-site site1.local bench new-site site1.local
* Add apps(make sure your current path is /home/frappe/frappe-bench) 6. Add apps(make sure your current path is /home/frappe/frappe-bench)
The get-app command gets remote frappe apps from a remote git repository and installs them. Example: [erpnext](https://github.com/frappe/erpnext) The get-app command gets remote frappe apps from a remote git repository and installs them. Example: [erpnext](https://github.com/frappe/erpnext)
bench get-app erpnext https://github.com/frappe/erpnext bench get-app erpnext https://github.com/frappe/erpnext
* Install apps(make sure your current path is /home/frappe/frappe-bench) 7. Install apps(make sure your current path is /home/frappe/frappe-bench)
To install an app on your new site, use the bench `install-app` command. To install an app on your new site, use the bench `install-app` command.
bench --site site1.local install-app erpnext bench --site site1.local install-app erpnext
* Start bench(make sure your current path is /home/frappe/frappe-bench) 8. Start bench(make sure your current path is /home/frappe/frappe-bench)
To start using the bench, use the `bench start` command To start using the bench, use the `bench start` command
bench start bench start
* Exiting the frappe container and stopping all the containers gracefully 9. Exiting the frappe container and stopping all the containers gracefully
exit exit
docker-compose stop docker-compose stop
* Removing docker containers 10. Removing docker containers
docker-compose rm docker-compose rm
* Removing dangling volumes 11. Removing dangling volumes
The volume frappe on your local machine is shared by the host(your local machine) and the frappe container. The volume frappe on your local machine is shared by the host(your local machine) and the frappe container.
Please do not delete this volume from your local machine. Any changes made in this directory will reflect on both Please do not delete this volume from your local machine. Any changes made in this directory will reflect on both
the container and the host. The below command specifies how to remain dangling volumes which may be taking up the container and the host. The below command specifies how to remain dangling volumes which may be taking up