Skip to content

Instantly share code, notes, and snippets.

@omfsakib
Last active February 8, 2025 06:54
Show Gist options
  • Select an option

  • Save omfsakib/30b9e008d7b10061cf2a89d33be8dff0 to your computer and use it in GitHub Desktop.

Select an option

Save omfsakib/30b9e008d7b10061cf2a89d33be8dff0 to your computer and use it in GitHub Desktop.

1 Clone repo https://github.com/GlascutrDev/FlexFactoryManager.git

2: cd repo

3: sudo mkdir -p sites && sudo mkdir -p logs

~ To create directory sites & logs

4: sudo chmod -R 777 .

~ To give permission on those directory

5: bench setup config

~ Generates required config files for bench project

6: bench setup env

~ Generates env 

7: bench setup requirements --dev

~ installs dev dependency for the project

8: bench setup requirements --python

~ installs python dependency for the project

9: bench setup requirements --node

~ installs node dependency for the project

10: bench setup redis

~ generates redis configuration for the project

11: bench setup procfile

~ generate procfile configuration which keeps the projects path and conf

12: nano sites/apps.txt

~ write the apps installed in this project

13: bench new-site **site-name**

~creates a new site

14: bench use [site-name]

14: bench install-app [apps-names] or bench --site [site-name] install-app [app-names]

15: bench build or bench --site [site-name] build

16: bench config dns_multitenant on

~ A config to make the site capable with https request

17: sudo -H bench setup lets-encrypt [site-name]

~ generates ssl configuration for the site

18: sudo bench setup production [ubuntu-user]

~ generates the production setup for this project

19: bench migrate or bench --site [site-name] migrate

20: remove the nginx conf file generated in conf.d directory then run this command

sudo ln -s /var/www/[project-directory-name]/config/nginx.conf /etc/nginx/site-enabled/

21: bench --site dev.local restore sites/dev.local/private/backups/20250205_210726-flexfactorymanager-dev_glascutr_com-database.sql.gz --with-public-files sites/dev.local/private/backups/20250205_210726-flexfactorymanager-dev_glascutr_com-files.tar --with-private-files sites/dev.local/private/backups/20250205_210726-flexfactorymanager-dev_glascutr_com-private-files.tar

22: bench set-config -g developer_mode 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment