Switch to git install with deps install and SCSS compile
This commit is contained in:
parent
bf5873560c
commit
c5cbb8382d
5 changed files with 24 additions and 20 deletions
|
@ -1,17 +1,6 @@
|
|||
---
|
||||
- name: "Unzip"
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ ansistrano_release_path.stdout }}/projectsend-{{ release }}.zip"
|
||||
dest: "{{ ansistrano_release_path.stdout }}"
|
||||
remote_src: true
|
||||
|
||||
- name: "Remove archive"
|
||||
file:
|
||||
path: "{{ ansistrano_release_path.stdout }}/projectsend-{{ release }}.zip"
|
||||
state: absent
|
||||
|
||||
#- name: "Update dependencies"
|
||||
# include_tasks: "dependencies.yml"
|
||||
- name: "Update dependencies"
|
||||
include_tasks: "dependencies.yml"
|
||||
|
||||
- name: "Configure"
|
||||
include_tasks: "configure.yml"
|
||||
|
|
|
@ -4,12 +4,20 @@
|
|||
command: install
|
||||
working_dir: "{{ ansistrano_release_path.stdout }}"
|
||||
|
||||
- name: "Create npm home dir"
|
||||
file:
|
||||
path: "/var/www/.npm"
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
become_user: root
|
||||
|
||||
- name: "Install JS dependencies"
|
||||
community.general.npm:
|
||||
path: "{{ ansistrano_release_path.stdout }}"
|
||||
|
||||
- name: "Compile SCSS"
|
||||
ansible.builtin.command:
|
||||
cmd: "./node_modules/gulp/bin/gulp.js"
|
||||
cmd: "./node_modules/gulp/bin/gulp.js build"
|
||||
chdir: "{{ ansistrano_release_path.stdout }}"
|
||||
#Todo: creates: ""
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
all:
|
||||
hosts:
|
||||
ubuntu:
|
||||
vars:
|
||||
scope: "prod"
|
||||
#ubuntu1:
|
||||
# scope: "test"
|
||||
vars:
|
||||
release: "r1335"
|
||||
db_name: "projectsend_{{ scope }}"
|
||||
db_user: "projectsend_{{ scope }}"
|
||||
|
|
|
@ -18,14 +18,15 @@
|
|||
ansistrano_ensure_basedirs_shared_files_exist: yes
|
||||
|
||||
# Deployment strategy - method used to deliver code. Options are copy, download, git, rsync, rsync_direct, svn, or s3.
|
||||
ansistrano_deploy_via: download
|
||||
ansistrano_deploy_via: git
|
||||
# Copy, download and s3 have an optional step to unarchive the downloaded file which can be used by adding _unarchive.
|
||||
# The rsync_direct strategy omits a file copy on the target offering a slight speed increase if you are deploying to shared hosts, are experiancing bad file-performance, or serve static assets from the same host you deploy your app to and rsync many files.
|
||||
# You can check all the options inside tasks/update-code folder!
|
||||
|
||||
ansistrano_allow_anonymous_stats: no
|
||||
|
||||
ansistrano_get_url: "https://github.com/projectsend/projectsend/releases/download/{{ release }}/projectsend-{{ release }}.zip"
|
||||
ansistrano_git_repo: "https://github.com/projectsend/projectsend.git"
|
||||
ansistrano_git_branch: master
|
||||
|
||||
# Hooks: custom tasks if you need them
|
||||
ansistrano_after_update_code_tasks_file: "{{ playbook_dir }}/ansistrano_tasks/after_update.yml"
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
---
|
||||
- name: "Install dependencies"
|
||||
ansible.builtin.apt:
|
||||
name: "mariadb-server"
|
||||
name:
|
||||
- "mariadb-server"
|
||||
- "python3-pymysql"
|
||||
update_cache: true
|
||||
cache_valid_time: 86400
|
||||
|
||||
- name: "Create database"
|
||||
mysql_db:
|
||||
ansible.builtin.mysql_db:
|
||||
login_unix_socket: "/var/run/mysqld/mysqld.sock"
|
||||
name: "{{ db_name }}"
|
||||
|
||||
- name: "Create user"
|
||||
mysql_user:
|
||||
ansible.builtin.mysql_user:
|
||||
login_unix_socket: "/var/run/mysqld/mysqld.sock"
|
||||
name: "{{ db_user }}"
|
||||
password: "{{ db_password }}"
|
||||
priv: "{{ db_name }}.*:ALL"
|
||||
|
|
Reference in a new issue