mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-01-24 15:48:34 +00:00
Updated README.md
- added dbench init to the README - moved usage commands to wiki
This commit is contained in:
parent
9efa4001c4
commit
e2415aa832
71
README.md
71
README.md
@ -101,77 +101,30 @@ Express dependency between services, which has two effects:
|
|||||||
|
|
||||||
|
|
||||||
#### Basic Usage
|
#### Basic Usage
|
||||||
1. Starting docker containers
|
##### Make sure your current directory is frappe_docker
|
||||||
|
1. First time setup
|
||||||
|
|
||||||
This command can be used to start containers
|
./dbench init
|
||||||
|
|
||||||
|
2. Command to start all the containers
|
||||||
|
|
||||||
docker-compose start
|
docker-compose start
|
||||||
|
|
||||||
2. Accessing the frappe container via CLI
|
3. Command to be executed everytime after starting your containers
|
||||||
|
|
||||||
|
./dbench -s
|
||||||
|
|
||||||
|
4. Command to enter your container
|
||||||
|
|
||||||
docker exec -i -u root frappe bash -c "cd /home/frappe && chown -R frappe:frappe ./*"
|
|
||||||
docker exec -it frappe bash
|
docker exec -it frappe bash
|
||||||
|
|
||||||
3. Create a new bench
|
5. All bench commands can also be directly run from the host machine by using dbench. For instance ```bench start``` can be executed by running ```./dbench -c start```. Just preface the option with <b>./dbench -c</b>. For more information on dbench run the command ```./dbench -h```.
|
||||||
|
|
||||||
The init command will create a bench directory with frappe framework
|
For more info on how to build this docker container refer to this [Wiki](https://github.com/frappe/frappe_docker/wiki/Hitchhiker's-guide-to-building-this-frappe_docker-image)
|
||||||
installed. It will be setup for periodic backups and auto updates once
|
|
||||||
a day.
|
|
||||||
|
|
||||||
cd .. && bench init frappe-bench --skip-bench-mkdir --skip-redis-config-generation && cd frappe-bench
|
|
||||||
mv Procfile_docker Procfile && mv sites/common_site_config_docker.json sites/common_site_config.json
|
|
||||||
|
|
||||||
4. Set the db host for bench (points bench to the mariadb container) since the 3 containers are linked
|
|
||||||
|
|
||||||
bench set-mariadb-host mariadb
|
|
||||||
|
|
||||||
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
|
|
||||||
site. The new-site command allows you to do that.
|
|
||||||
|
|
||||||
bench new-site site1.local
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
bench get-app erpnext https://github.com/frappe/erpnext
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
bench --site site1.local install-app erpnext
|
|
||||||
|
|
||||||
8. Start bench (make sure your current path is /home/frappe/frappe-bench)
|
|
||||||
|
|
||||||
To start using the bench, use the `bench start` command
|
|
||||||
|
|
||||||
bench start
|
|
||||||
|
|
||||||
9. Exiting the frappe container and stopping all the containers gracefully.
|
|
||||||
|
|
||||||
exit
|
|
||||||
docker-compose stop
|
|
||||||
|
|
||||||
10. Removing docker containers
|
|
||||||
|
|
||||||
docker-compose rm
|
|
||||||
|
|
||||||
11. Removing dangling volumes
|
|
||||||
|
|
||||||
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
|
|
||||||
the container and the host. The below command specifies how to remain dangling volumes which may be taking up
|
|
||||||
unecessary space on your host.
|
|
||||||
|
|
||||||
docker volume rm $(docker volume ls -f dangling=true -q)
|
|
||||||
|
|
||||||
To login to Frappe / ERPNext, open your browser and go to `[your-external-ip]:8000`, probably `localhost:8000`
|
To login to Frappe / ERPNext, open your browser and go to `[your-external-ip]:8000`, probably `localhost:8000`
|
||||||
|
|
||||||
The default username is "Administrator" and password is what you set when you created the new site.
|
The default username is "Administrator" and password is what you set when you created the new site.
|
||||||
|
|
||||||
## Built With
|
## Built With
|
||||||
|
|
||||||
* [Docker](https://www.docker.com/)
|
* [Docker](https://www.docker.com/)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user