mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +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 }}"
|
||||
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 }}
|
||||
args:
|
||||
creates: "{{ bench_path }}"
|
||||
@ -47,16 +47,25 @@
|
||||
creates: "{{ bench_path }}/sites/common_site_config.json"
|
||||
chdir: "{{ bench_path }}"
|
||||
|
||||
- name: install frappe app
|
||||
command: bench get-app frappe https://github.com/frappe/frappe
|
||||
- include_tasks: setup_inputrc.yml
|
||||
|
||||
# Setup Procfile
|
||||
- name: Setup Procfile
|
||||
command: bench setup procfile
|
||||
args:
|
||||
creates: "{{ bench_path }}/apps/frappe"
|
||||
creates: "{{ bench_path }}/Procfile"
|
||||
chdir: "{{ bench_path }}"
|
||||
|
||||
- include_tasks: setup_dev_env.yml
|
||||
when: not run_travis and not production and (not without_bench_setup and ansible_distribution == 'Ubuntu')
|
||||
# Setup Redis env for RQ
|
||||
- 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
|
||||
- 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
|
||||
become: yes
|
||||
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"
|
||||
register: app
|
||||
|
||||
- name: get erpnext
|
||||
- name: Get the ERPNext app
|
||||
command: bench get-app erpnext https://github.com/frappe/erpnext --branch {{ branch }}
|
||||
args:
|
||||
creates: "{{ bench_path }}/apps/erpnext"
|
||||
@ -14,15 +14,14 @@
|
||||
stat: path="{{ bench_path }}/sites/site1.local"
|
||||
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 }}
|
||||
args:
|
||||
chdir: "{{ bench_path }}"
|
||||
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
|
||||
args:
|
||||
chdir: "{{ bench_path }}"
|
||||
|
||||
...
|
Loading…
Reference in New Issue
Block a user