OS: Debian 12 fresh install
Reference: https://github.com/rtCamp/Frappe-Manager
Pre-requisite: python 3.11+ and docker
ced@deb12:~$ python3 -V
Python 3.11.2
Python version > 3.11, so Ok
su -
Enter password
You become root, $ prompt will change to #
visudo
Locate the following
# User privilege specification
root ALL=(ALL:ALL) ALL
and make it by adding a line, in case your username is ced (replace ced with your username)
# User privilege specification
root ALL=(ALL:ALL) ALL
ced ALL=(ALL:ALL) ALL
Save file and exit the editor.
Type again exit
on #
prompt to move from root
to normal user, in my case ced
root@deb12:~# exit
ced@deb12:~$
You should see your
Open file ~/.bashrc
in any editor, and add following at the end of file
export PATH=$PATH:/home/ced/.local/bin
Ref: https://docs.docker.com/engine/install/debian/
Put following in frappeInstall01.sh file:
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl -y
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Issue the command:
bash frappeInstall01.sh
Add user to usergroup docker
sudo usermod -aG docker ced
sudo reboot
Open the terminal again by typing ter
search bar, and selecting Terminal
icon.
Check docker installation:
docker --version
If you see somethig like Docker version 27.1.1, build 6312585
, then all good.
Issue command:
docker run hello-world
If message indicate that docker installtion is successful (as given below) then proceed further.
docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:1408fec50309afee38f3535383f5b09419e6dc0925bc69891e79d84cc4cdcec6
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
ced@deb12:~$
Create a file frappeInstall02.sh
with content:
sudo apt install python3-pip -y
pip install frappe-manager --break-system-packages
fm --install-completion
Save fie and close the editor. Issue the command:
bash frappeInstall02.sh
Close the terminal and open the new one.
To create website with URL hsr.com (give any name of your choice):
time fm create hsr.com
Itβs output will be:
π Pending Migrations...
π¦ v0.9.0
π¦ v0.10.0
π¦ v0.11.0
π¦ v0.12.0
π¦ v0.13.0
π¦ v0.13.1
π¦ v0.14.0
π¦ v0.15.0
β³ This process may take a while.
π For a manual migration guide, visit
https://github.com/rtCamp/Frappe-Manager/wiki/Migrations#manual-migration-proced
ure
Options :
[yes] Start Migration: Proceed with the migration process.
[no] Abort and Revert: Do not migrate and revert to the previous fm version.
Do you want to proceed with the migration ? [yes/no]: yes
ββββββββββββββββββββββββββββββββββ π¦ v0.9.0 βββββββββββββββββββββββββββββββββββ
β
Moved benches from /home/ced/frappe to /home/ced/frappe/sites
ββββββββββββββββββββββββββββββββββ π¦ v0.10.0 ββββββββββββββββββββββββββββββββββ
β
Generated services compose file.
β
Created services at /home/ced/frappe/services.
ββββββββββββββββββββββββββββββββββ π¦ v0.11.0 ββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββ π¦ v0.12.0 ββββββββββββββββββββββββββββββββββ
β
Image pulled ghcr.io/rtcamp/frappe-manager-frappe:v0.12.0
ββββββββββββββββββββββββββββββββββ π¦ v0.13.0 ββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββ π¦ v0.13.1 ββββββββββββββββββββββββββββββββββ
β
Added fm header config to nginx-proxy.
ββββββββββββββββββββββββββββββββββ π¦ v0.14.0 ββββββββββββββββββββββββββββββββββ
β
Migrated fm_config.toml
ββββββββββββββββββββββββββββββββββ π¦ v0.15.0 ββββββββββββββββββββββββββββββββββ
β
Image pulled jwilder/nginx-proxy:1.6
β
Migrated services compose
β
Restarted services
β Docker image 'ghcr.io/rtcamp/frappe-manager-frappe:v0.15.0' is not available
locally
β Docker image 'ghcr.io/rtcamp/frappe-manager-nginx:v0.15.0' is not available
locally
β Docker image 'redis:6.2-alpine' is not available locally
β Docker image 'ghcr.io/rtcamp/frappe-manager-mailhog:v0.8.3' is not available
locally
β Docker image 'adminer:4' is not available locally
β Error Occured hsr.com : Required docker images not available. Pull all
required images using command 'fm self update images'.
π More info about error is logged in /home/ced/frappe/logs/fm.log
real 7m34.764s
user 0m6.315s
sys 0m1.555s
If no such error occured, then skip the next 2 commands:
time fm self update images
Itβs output is:
β
Pulled ghcr.io/rtcamp/frappe-manager-frappe:v0.15.0.
β
Pulled ghcr.io/rtcamp/frappe-manager-nginx:v0.15.0.
β
Pulled redis:6.2-alpine.
β
Pulled mariadb:10.6.
β
Pulled jwilder/nginx-proxy:1.6.
β
Pulled ghcr.io/rtcamp/frappe-manager-mailhog:v0.8.3.
β
Pulled adminer:4.
real 4m41.825s
user 0m5.437s
sys 0m0.628s
Issue command:
time fm create hsr.com
Itβs output is:
β
Created all required directories.
β
Started bench services.
β
Configured common_site_config.json
β
Configured frappe server
β
Configured supervisor configs
β
Configured frappe app's branch -> version-15
β
global-db:3306 is available after 0 seconds
β
hsrcom-redis-cache:6379 is available after 0 seconds
β
hsrcom-redis-queue:6379 is available after 0 seconds
β
hsrcom-redis-socketio:6379 is available after 0 seconds
β
Removed prebaked app erpnext
β
Removed prebaked app hrms
β
Created bench site hsr.com
β
Installed app frappe in site.
β
Installed dev packages in env.
β
Configured and Started dev services.
β
Reloaded nginx.
β
Configured Mailhog as default mail server.
β
Enabled Admin-tools.
β
Restarted frappe server
β
Workers compose not present. Generating...
β
Saved bench config.
β
Bench site is active and responding.
βββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββ
β Bench Url β http://hsr.com β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Bench Root β /home/ced/frappe/sites/hsr.com β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Frappe Username β administrator β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Frappe Password β S3Kre β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Root DB User β root β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Root DB Password β 7@cOI!S@e?@+_rt!f---+XD+4w3-6_Zs β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Root DB Host β global-db β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β DB Name β hsr-com β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β DB User β hsr-com β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β DB Password β uEKz9DOxSvGdjfk6 β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Environment β dev β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β HTTPS β Not Enabled β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Admin Tools β Tool β URL β
β β ββββββββββββββββββββββββββββββββββββββββββββ β
β β Mailhog β http://hsr.com/mailhog β
β β βββββββββββββΌβββββββββββββββββββββββββββββββ β
β β Adminer β http://hsr.com/adminer β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Bench Apps β App β Version β
β β ββββββββββββββββββββββββββββββββββββββββββββ β
β β frappe β 15.37.0 β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Bench Services β frappe β nginx β β
β β redis-cache β redis-queue β β
β β redis-socketio β schedule β β
β β socketio β β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Bench Workers β long-worker β short-worker β β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββ€
β Bench Admin Tools β adminer β mailhog β β
βββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββ
β
Please note that You will have to add a host entry to your system's hosts file to access the bench locally.
real 7m52.632s
user 0m27.123s
sys 0m22.283s
Add 27.0.0.1 hsr.com
in file /etc/hosts
to make this file look like (a part of file):
127.0.0.1 localhost
127.0.0.1 hsr.com
New line added is the last line as per above.