mirror of
https://github.com/frappe/bench.git
synced 2024-11-14 09:14:04 +00:00
fixes to prevent uncommited files in production
This commit is contained in:
parent
e59c704229
commit
ae7c28e9c1
@ -34,7 +34,7 @@
|
|||||||
creates: "{{ bench_path }}"
|
creates: "{{ bench_path }}"
|
||||||
when: not bench_stat.stat.exists and not production
|
when: not bench_stat.stat.exists and not production
|
||||||
|
|
||||||
- name: python2 bench init for develop
|
- name: python2 bench init for production
|
||||||
command: bench init {{ bench_path }} --frappe-branch {{ branch }}
|
command: bench init {{ bench_path }} --frappe-branch {{ branch }}
|
||||||
args:
|
args:
|
||||||
creates: "{{ bench_path }}"
|
creates: "{{ bench_path }}"
|
||||||
@ -47,16 +47,25 @@
|
|||||||
creates: "{{ bench_path }}/sites/common_site_config.json"
|
creates: "{{ bench_path }}/sites/common_site_config.json"
|
||||||
chdir: "{{ bench_path }}"
|
chdir: "{{ bench_path }}"
|
||||||
|
|
||||||
- name: install frappe app
|
- include_tasks: setup_inputrc.yml
|
||||||
command: bench get-app frappe https://github.com/frappe/frappe
|
|
||||||
|
# Setup Procfile
|
||||||
|
- name: Setup Procfile
|
||||||
|
command: bench setup procfile
|
||||||
args:
|
args:
|
||||||
creates: "{{ bench_path }}/apps/frappe"
|
creates: "{{ bench_path }}/Procfile"
|
||||||
chdir: "{{ bench_path }}"
|
chdir: "{{ bench_path }}"
|
||||||
|
|
||||||
- include_tasks: setup_dev_env.yml
|
# Setup Redis env for RQ
|
||||||
when: not run_travis and not production and (not without_bench_setup and ansible_distribution == 'Ubuntu')
|
- name: Setup Redis
|
||||||
|
command: bench setup redis
|
||||||
|
args:
|
||||||
|
creates: "{{ bench_path }}/config/redis_socketio.conf"
|
||||||
|
chdir: "{{ bench_path }}"
|
||||||
|
|
||||||
- include_tasks: setup_inputrc.yml
|
# Setup an ERPNext site called site1.local
|
||||||
|
- include_tasks: setup_erpnext.yml
|
||||||
|
when: not run_travis
|
||||||
|
|
||||||
# Setup Bench for production environment
|
# Setup Bench for production environment
|
||||||
- include_tasks: setup_bench_production.yml
|
- include_tasks: setup_bench_production.yml
|
||||||
|
@ -1,42 +1,4 @@
|
|||||||
---
|
---
|
||||||
# In case we are re-running the script, we would like to skip the site creation
|
|
||||||
- name: Check whether a site exists
|
|
||||||
stat: path="{{ bench_path }}/sites/{{ site }}"
|
|
||||||
register: site_folder
|
|
||||||
|
|
||||||
- name: Create new site
|
|
||||||
command: bench new-site {{ site }} --admin-password {{ admin_password }} --mariadb-root-password {{ mysql_root_password }}
|
|
||||||
args:
|
|
||||||
chdir: "{{ bench_path }}"
|
|
||||||
when: not site_folder.stat.exists
|
|
||||||
|
|
||||||
- name: Check ERPNext App exists
|
|
||||||
stat: path="{{ bench_path }}/apps/erpnext"
|
|
||||||
register: app
|
|
||||||
|
|
||||||
# In case we are re-running the script, we would like to skip getting ERPNext App
|
|
||||||
- name: Get-app erpnext app
|
|
||||||
command: bench get-app erpnext https://github.com/frappe/erpnext.git --branch {{ branch }}
|
|
||||||
args:
|
|
||||||
chdir: '{{ bench_path }}'
|
|
||||||
when: not app.stat.exists
|
|
||||||
|
|
||||||
- name: Install erpnext app
|
|
||||||
command: bench --site {{ site }} install-app erpnext
|
|
||||||
args:
|
|
||||||
chdir: '{{ bench_path }}'
|
|
||||||
|
|
||||||
- name: Change permissions for frappe home folder
|
|
||||||
become: yes
|
|
||||||
become_user: root
|
|
||||||
file:
|
|
||||||
dest: '/home/{{ frappe_user }}'
|
|
||||||
owner: '{{ frappe_user }}'
|
|
||||||
group: '{{ frappe_user }}'
|
|
||||||
mode: 0755
|
|
||||||
recurse: yes
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Setup production
|
- name: Setup production
|
||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
# Setup Procfile
|
|
||||||
- name: setup procfile
|
|
||||||
command: bench setup procfile
|
|
||||||
args:
|
|
||||||
creates: "{{ bench_path }}/Procfile"
|
|
||||||
chdir: "{{ bench_path }}"
|
|
||||||
|
|
||||||
|
|
||||||
# Setup Redis env for RQ
|
|
||||||
- name: setup redis
|
|
||||||
command: bench setup redis
|
|
||||||
args:
|
|
||||||
creates: "{{ bench_path }}/config/redis_socketio.conf"
|
|
||||||
chdir: "{{ bench_path }}"
|
|
||||||
|
|
||||||
|
|
||||||
# Setup an ERPNext site called site1.local
|
|
||||||
- include_tasks: setup_erpnext.yml
|
|
||||||
hosts: localhost
|
|
||||||
...
|
|
@ -3,7 +3,7 @@
|
|||||||
stat: path="{{ bench_path }}/apps/erpnext"
|
stat: path="{{ bench_path }}/apps/erpnext"
|
||||||
register: app
|
register: app
|
||||||
|
|
||||||
- name: get erpnext
|
- name: Get the ERPNext app
|
||||||
command: bench get-app erpnext https://github.com/frappe/erpnext --branch {{ branch }}
|
command: bench get-app erpnext https://github.com/frappe/erpnext --branch {{ branch }}
|
||||||
args:
|
args:
|
||||||
creates: "{{ bench_path }}/apps/erpnext"
|
creates: "{{ bench_path }}/apps/erpnext"
|
||||||
@ -14,15 +14,14 @@
|
|||||||
stat: path="{{ bench_path }}/sites/site1.local"
|
stat: path="{{ bench_path }}/sites/site1.local"
|
||||||
register: site_folder
|
register: site_folder
|
||||||
|
|
||||||
- name: create a new default site
|
- name: Create a new site
|
||||||
command: bench new-site site1.local --admin-password {{ admin_password }} --mariadb-root-password {{ mysql_root_password }}
|
command: bench new-site site1.local --admin-password {{ admin_password }} --mariadb-root-password {{ mysql_root_password }}
|
||||||
args:
|
args:
|
||||||
chdir: "{{ bench_path }}"
|
chdir: "{{ bench_path }}"
|
||||||
when: not site_folder.stat.exists
|
when: not site_folder.stat.exists
|
||||||
|
|
||||||
- name: install erpnext to default site
|
- name: Install ERPNext to default site
|
||||||
command: bench --site site1.local install-app erpnext
|
command: bench --site site1.local install-app erpnext
|
||||||
args:
|
args:
|
||||||
chdir: "{{ bench_path }}"
|
chdir: "{{ bench_path }}"
|
||||||
|
|
||||||
...
|
...
|
Loading…
Reference in New Issue
Block a user