In order to utilise the full integration between ERPNext and Frepple, you will need a running instance of Frepple software. To install Frepple software in both Windows and Linux refer to this document.
-
Prerequisites:
- Windows: Docker Desktop
- Ubuntu: Docker Engine, Docker Compose
- Mac: Docker Desktop
-
The installation of this release includes the following:
-
For Windows & MacOS user, start from
Section 3. -
For Ubuntu user, start from
Section 4.
-
The setup guide is tested to work on
Windows 10,Ubuntu 18.04andmacOS Mojave 10.14.6 -
For Windows and MacOS, create a folder.
-
Open a Powershell terminal, navigate to the newly created folder.
-
Go to
Section 5: Setup.
-
Open a terminal.
-
Create a user called
frappe. (You can give a name of your preference to replacefrappe)sudo adduser frappe
-
You may be promted to give a password for the newly created user
frappe. Remember this password, you will need it for the next step. -
Log into the user
frappesu - frappe
-
Create a folder called
frappe_docker. Again, folder name is of your preference. Navigate into the new directory.mkdir frappe_dockercd frappe_docker
-
Go to
Section 5: Setup.
-
Clone this repo.
git clone https://github.com/msf4-0/ERPNext-ECommerce-Shopify
-
Navigate to the cloned folder.
cd ERPNext-ECommerce-Shopify
-
In
enx-example, you can change the variables that would be used in this installation process to your preference such as the following:- Server port to host ERPNext,
ERPNEXT_SERVER_PORT. Default is8000. - Database port,
MARIADB_SERVER_PORT. Default is3306. - Site name
SITE_NAME. Default iscustom-erpnext-nginx.
Note:
- You can leave these variables as it's provided if all the specified ports are not occupied.
- Upon successful setup, you can access ERPNext via port number
ERPNEXT_SERVER_PORT. - For Metabase Integration, you would need to connect to Mariadb via
MARIADB_SERVER_PORT.
- Server port to host ERPNext,
-
Copy environment variables from the
env-examplefile into.envfile using this commandcp env-example .env. -
Start all the docker containers by this command
docker-compose -p <project_name> up -d.Note:
- Replace
<project_name>to your preference. - For example,
docker-compose -p project1 up -d
- Replace
-
Monitor the site creation progress by logging into the
<project_name>-site-creator-1container. To do this step, use this commanddocker logs <project_name>-site-creator-1 -f.Note:
- Replace
<project_name>to the same project name as in step 4. - For example,
docker logs project1-site-creator-1 -f. - If you face
no such containererror, try withdocker logs project1-site-creator_1 -fordocker logs project1_site-creator_1 -f.
- Replace
-
After the
<project_name>-site-creator-1container displayScheduler is disabled, login to<project_name>-erpnext-python-1container. Usedocker exec -it --user root <project_name>-erpnext-python-1 /bin/bashto login into this container as a root user.Note:
- Replace
<project_name>to the same project name selected in step 4. - For example,
docker exec -it --user root project1-erpnext-python-1 /bin/bash. - If you face
no such containererror, try withdocker exec -it --user root project1-erpnext-python_1 /bin/bashordocker exec -it --user root project1_erpnext-python_1 /bin/bash.
- Replace
-
Once you login in into
<project_name>-erpnext-python-1container, by default, you will be in the~:/home/frappe/frappe-bench/sitesdirectory. Navigate out to~:/home/frappe/frappe-benchdirectory by typingcd ... -
Now, apply the new changes in Frepple app by running this command
bench --site <site_name> migrate.Note:
- Replace
<site_name>to the same name as specified in the .env file. Refer to step 3 and 4. - For example,
bench --site custom-erpnext-nginx migrate
- Replace
-
After the process
Compiling Python files...is finished, you will be back in the~:/home/frappe/frappe-benchdirectory. This means thebench migrateprocess is completed. Typeexitto exit from<project_name>-erpnext-python-1container. -
Now, you can open any browser such as
Google Chromeand access ERPNext viahttp://localhost:<ERPNext_Server_Port>orhttp://<Your_IP_address>:<ERPNext_Server_Port>.Note:
- Type the selected ERPNext port number in
<ERPNext_Server_Port>selected in step 4. - For example,
http://localhost:8000orhttp://127.0.0.1:8000.
- Type the selected ERPNext port number in
-
Default credentials.
- Username:
Administrator - Password:
admin
- Username:
- To stop all the docker containers related to your
<peoject-name> project:- Open a Powershell terminal, navigate to
IRPS-Enhanced-Frepple-Integrationfolder. - Run
docker-compose -p <project-name> stop. - For example,
docker-compose -p project1 stop.
- Open a Powershell terminal, navigate to
- To start up all the docker containers related to your
<peoject-name> project:- Open a Powershell terminal, navigate to
IRPS-Enhanced-Frepple-Integrationfolder. - Run
docker-compose -p <project-name> start. - For example,
docker-compose -p project1 start.
- Open a Powershell terminal, navigate to
- To remove all the docker containers related to your
<peoject-name> project:- Open a Powershell terminal, navigate to
IRPS-Enhanced-Frepple-Integrationfolder. - Run
docker-compose -p <project-name> downor rundocker-compose -p <project-name> down -vto remove the related Docker Volume. - For example,
docker-compose -p project1 down -v
- Open a Powershell terminal, navigate to
- Assumptions:
- You have a running instance of ERPNext in docker production container.
- How to update custom app
- Assumptions:
- You have a running instance of ERPNext in docker production container.
- Alternatives:
- Assumptions:
- You have your backup files on your pc (if you perform online backup, you can download the backup files onto your pc).
- You have a running instance of ERPNext in docker production container in which you want to restore with the backup files.
- Restore
- Fork this repo to build your own image with ERPNext and list of custom Frappe apps.
- Change
nginx/Dockerfileand add required apps. Refer comments in the file. - Change
worker/Dockerfileand add required apps.
Example file uses following apps:
- Metabase Integration
- Telegram Integration
- Enhanced Frepple Integration
- Barcode Scanning System
- Autocount
- SQL Account
Execute from root of app repo.
For nginx:
# For version-12
docker build --build-arg=FRAPPE_BRANCH=version-12 --build-arg=GITHUB_OWNER=<github-username> -t custom-erpnext-nginx:v12 nginx
# Example:
docker build --build-arg=FRAPPE_BRANCH=version-12 --build-arg=GITHUB_OWNER=msf4-0 -t custom-erpnext-nginx:version-12 nginxFor worker:
# For version-12
docker build --build-arg=FRAPPE_BRANCH=version-12 --build-arg=GITHUB_OWNER=<github-username> -t custom-erpnext-worker:version-12 worker
# Example:
docker build --build-arg=FRAPPE_BRANCH=version-12 --build-arg=GITHUB_OWNER=msf4-0 -t custom-erpnext-worker:version-12 worker- Tag the images bulilt from Step 2 with the format:
docker tag <Image Name>:<Version> <Docker Hub Username>/<Image Name>:<Version>
For nginx:
docker tag custom-erpnext-nginx:version-12 shrdc/custom-erpnext-nginx:version-12For worker:
docker tag custom-erpnext-worker:version-12 shrdc/custom-erpnext-worker:version-12Reference: Steps to create a Docker Hub, and push images to it.
- To push to Docker Hub, run
docker pushwith the tagged name created before.
docker push shrdc/custom-erpnext-nginx:version-12
docker push shrdc/custom-erpnext-worker:version-12- Possible troubleshoot:
When you face
denied: requested access to the resource is deniedwhen pushing images, rundocker loginand enter your credentials. Then push image again.
- You may need to change the
DOCKER_USERNAMEinenv-exampleto the username of the Docker Hub account in which you have pushed your images to. - Copy
env-exampleinto.envby runningcp env-example .env.
- The following commands should be executed on the
~/some/path/Integrated-Resource-Planning-System-IRPSdirectory docker-compose -p <project_name> up -ddocker logs <project_name>_site-creator_1 -f- If you got a
no such containererror, you may need to change todocker logs <project_name>-site-creator-1 -f
- If you got a
- After the
site_creatorcontainer exited, open a browser, you can access ERPNext onlocalhost:8000or127.0.0.1:8000. - You can push the changes back to this repo (or your own repo if you forked one from this repo).
This software is licensed under the GNU GPLv3 LICENSE © Selangor Human Resource Development Centre. 2021. All Rights Reserved.







