File tree 5 files changed +47
-33
lines changed
vagrant/provisioning/roles/mystamps-app
5 files changed +47
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description = MyStamps site
3
+ After = syslog.target
4
+
5
+ [Service]
6
+ User = mystamps
7
+ WorkingDirectory = /data/mystamps
8
+ EnvironmentFile = /data/mystamps/mystamps.conf
9
+ ExecStart = /usr/bin/java $JAVA_OPTS -jar /data/mystamps/mystamps.war
10
+ SuccessExitStatus = 143
11
+
12
+ [Install]
13
+ WantedBy = multi-user.target
Original file line number Diff line number Diff line change 1
1
---
2
2
3
+ # TODO: use systemd module (requires ansible 2.2+)
4
+ - name : Reloading systemd service
5
+ command :
6
+ systemctl daemon-reload
7
+
3
8
- name : Restarting mystamps service
4
9
service :
5
10
name : mystamps
Original file line number Diff line number Diff line change 12
12
notify :
13
13
- Restarting mystamps service
14
14
15
- - name : Creating init-script
16
- file :
17
- src : /data/mystamps/mystamps.war
18
- dest : /etc/init.d/mystamps
19
- state : link
15
+ - name : Creating mystamps.conf
16
+ template :
17
+ src : mystamps.conf
18
+ dest : /data/mystamps/mystamps.conf
19
+ force : yes
20
+ backup : no
21
+ owner : mystamps
22
+ group : mystamps
23
+ mode : ' 0644'
24
+ notify :
25
+ - Restarting mystamps service
26
+
27
+ - name : Creating mystamps.service
28
+ copy :
29
+ src : mystamps.service
30
+ dest : /etc/systemd/system/mystamps.service
31
+ owner : root
32
+ group : root
33
+ mode : ' 0644'
34
+ notify :
35
+ - Reloading systemd service
36
+ - Restarting mystamps service
20
37
21
38
- name : Creating /data/logs
22
39
file :
26
43
mode : ' 0755'
27
44
state : directory
28
45
29
- - name : Creating /data/uploads
46
+ - name : Creating /data/heap-dumps
30
47
file :
31
- path : /data/uploads
48
+ path : /data/heap-dumps
32
49
owner : mystamps
33
50
group : mystamps
34
51
mode : ' 0755'
35
52
state : directory
36
- when : profile == 'prod'
37
53
38
- - name : Creating /data/heap-dumps
54
+ - name : Creating /data/uploads
39
55
file :
40
- path : /data/heap-dumps
56
+ path : /data/uploads
41
57
owner : mystamps
42
58
group : mystamps
43
59
mode : ' 0755'
66
82
- Restarting mystamps service
67
83
when : profile == 'prod'
68
84
69
- - name : Creating mystamps.conf
70
- copy :
71
- src : mystamps.conf
72
- dest : /data/mystamps/mystamps.conf
73
- mode : ' 0644'
74
- notify :
75
- - Restarting mystamps service
76
- when : profile == 'prod'
77
-
78
- - name : Creating /var/log/mystamps
79
- file :
80
- path : /var/log/mystamps
81
- owner : mystamps
82
- group : mystamps
83
- mode : ' 0755'
84
- state : directory
85
- when : profile == 'prod'
86
-
87
85
- name : Running service
88
86
service :
89
87
name : mystamps
Original file line number Diff line number Diff line change
1
+ # This file is being read and used by /etc/systemd/system/mystamps.service
2
+ SPRING_PROFILES_ACTIVE={{ profile }}
3
+ JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heap-dumps -XX:+UseCompressedOops -Dsun.rmi.dgc.client.gcInterval=86400000 -Dsun.rmi.dgc.server.gcInterval=86400000 -Djava.security.egd=file:/dev/./urandom -Xmx128m
You can’t perform that action at this time.
0 commit comments