This repository has been archived by the owner on Apr 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yml
46 lines (39 loc) · 1.21 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This is an Ansible playbook for deploying Frontend.
# Things tagged 'remote' don't involve any local building or transferring.
# This means the playbook can be used, for example, to restart the app server
# for any reason, without deploying the latest code, by specifying "-t remote"
- name: Build Frontend
hosts: beta.eval.so
accelerate: true
user: root
tasks:
- name: Clean
local_action: command cabal clean
- name: Build
local_action: command cabal build
- name: Deploy Frontend
hosts: beta.eval.so
# accelerate: true
user: root
sudo: true
sudo_user: evalso
tasks:
- name: Deploy
copy: src=dist/build/frontend3/frontend3 dest=/srv/frontend3/frontend3
- name: Make it executable
file: path=/srv/frontend3/frontend3 mode=0755
- name: Pull latest git (for static assets, templates, etc)
git: repo=git://github.com/eval-so/frontend3.git dest=/srv/frontend3 update=yes
tags:
- remote
- name: Stop the old snap server
command: killall frontend3
ignore_errors: true
tags:
- remote
- name: Start the new snap server
shell: chdir=/srv/frontend3 LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 nohup ./frontend3 &
async: 8640000000
poll: 0
tags:
- remote