2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 02:28:57 +00:00
Docker images for production and development setups of the Frappe framework and ERPNext
Go to file
vishalseshagiri e7134dbaa9 Update README.md
Former-commit-id: f0a60fe45a
2017-07-24 15:42:55 +05:30
conf/mariadb-conf.d First working dockerization 2017-07-18 09:00:58 +00:00
frappe removed unecessary files 2017-07-24 09:05:33 +00:00
build-container.sh start-container became build-container, added new start-container and updated README.md 2017-07-24 15:19:32 +05:30
docker-compose.yml Port forwarding enabled+start-container.sh+setup.sh 2017-07-24 08:52:16 +00:00
Dockerfile Port forwarding enabled+start-container.sh+setup.sh 2017-07-24 08:52:16 +00:00
LICENSE.md Create LICENSE.md 2017-07-18 15:18:45 +05:30
README.md Update README.md 2017-07-24 15:42:55 +05:30
start-container.sh start-container became build-container, added new start-container and updated README.md 2017-07-24 15:19:32 +05:30

frappe_docker

Containerizing the frappe bench installation for a development environment

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

Docker
docker-compose

Installing

A step by step series of examples that tell you have to get a development env running

1. Installation Pre-requisites

  • Installing Docker Community Edition

    Follow the steps given in here

      The Docker version used by us is 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

    Follow the steps given in here

      The docker-compose version used by us is docker-compose version 1.14.0, build c7bdf9e
    

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

      source build-container.sh
    
      Note: Please do not remove the bench directory the above commands will create
    

Basic Usage

  • Starting docker containers This command can be used to start containers

      docker-compose start
    
  • Accessing the frappe container via CLI

      ./start-container.sh
    
  • Set the db host for bench(points bench to the mariadb container)

      bench set-mariadb-host mariadb
    
  • Create a new bench

    The init command will create a bench directory with frappe framework installed. It will be setup for periodic backups and auto updates once a day.

      bench init frappe-bench && cd frappe-bench
    
  • Add a site

    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
    
  • Add apps

    The get-app command gets remote frappe apps from a remote git repository and installs them. Example: erpnext

      bench get-app erpnext https://github.com/frappe/erpnext
    
  • Install apps

    To install an app on your new site, use the bench install-app command.

      bench --site site1.local install-app erpnext
    
  • Exiting the frappe container and stopping all the containers gracefully exit

      docker-compose stop
    
  • Removing docker containers

      docker-compose rm
    
  • 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

The default username is "Administrator" and password is what you set when you created the new site.

Built With

Contributing

Feel free to contribute to this project and make the containers better

Authors

  • Vishal Seshagiri

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments