- Production Setup: Single Server Single Bench (follow the guide below)
- Production Setup: Single Server Multi Bench
- Production Setup: Multi Server Docker Swarm
- Production Setup: Multi Server Kubernetes
- Development Setup: Source code access with VSCode
-
Prerequisites:
- Windows: Docker Desktop
- Ubuntu: Docker Engine, Docker Compose
- Mac: Docker Desktop
-
Frappe Apps included:
-
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.04
andmacOS 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
frappe
su - frappe
-
Create a folder called
frappe_docker
. Again, folder name is of your preference. Navigate into the new directory.mkdir frappe_docker
cd frappe_docker
-
Go to
Section 5: Setup
.
-
Clone this repo.
git clone https://github.com/msf4-0/Integrated-Resource-Planning-System-IRPS.git
-
Navigate to the cloned folder.
cd Integrated-Resource-Planning-System-IRPS
-
In
enx-example
, you can change theERPNEXT_SERVER_PORT
andMARIADB_SERVER_PORT
variables. Copy environment variables from theenv-example
file into.env
file.- 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
cp env-example .env
- Upon successful setup, you can access ERPNext via port number
-
Start all the docker containers. Note: Replace
<project_name>
to your preference.docker-compose -p <project_name> up -d
- For example,
docker-compose -p project1 up -d
-
Monitor the site creation progress by logging the
<project_name>_site-creator_1
container.docker logs <project_name>_site-creator_1 -f
- For example,
docker logs project1_site-creator_1 -f
- If you face
no such container
error, try withdocker logs project1-site-creator-1 -f
-
After the
<project_name>_site-creator_1
container displayScheduler is disabled
, you can openGoogle Chrome
and access ERPNext vialocalhost:8000
or127.0.0.1:8000
. -
Default credentials.
- Username:
Administrator
- Password:
admin
- Username:
- To stop all the docker containers related to your
<peoject-name
> project- In the
Integrated-Resource-Planning-System-IRPS
directory, rundocker-compose -p <project-name> stop
- For example,
docker-compose -p project1 stop
- In the
- To start up all the docker containers related to your
<peoject-name
> project- In the
Integrated-Resource-Planning-System-IRPS
directory, rundocker-compose -p <project-name> start
- For example,
docker-compose -p project1 start
- In the
- To remove all the docker containers related to your
<peoject-name
> project- Run
docker-compose -p <project-name> down
- Run
docker-compose -p <project-name> down -v
to remove the related Docker Volume - For example,
docker-compose -p project1 down -v
- Run
- 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/Dockerfile
and add required apps. Refer comments in the file. - Change
worker/Dockerfile
and add required apps.
Example file uses following apps:
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 nginx
For 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
- Steps to create a Docker Hub, and push images to it.
- Possible troubleshoot:
- When you face
denied: requested access to the resource is denied
when pushing images, rundocker login
and enter your credentials. Then push image again.
- When you face
- You may need to change the
DOCKER_USERNAME
inenv-example
to the username of the Docker Hub account in which you have pushed your images to. - Copy
env-example
into.env
by runningcp env-example .env
.
- The following commands should be executed on the
~/some/path/Integrated-Resource-Planning-System-IRPS
directory docker-compose -p <project_name> up -d
docker logs <project_name>_site-creator_1 -f
- If you got a
no such container
error, you may need to change todocker logs <project_name>-site-creator-1 -f
- If you got a
- After the
site_creator
container exited, open a browser, you can access ERPNext onlocalhost:8000
or127.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.