This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
spec.yml
82 lines (67 loc) · 2.16 KB
/
spec.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: traefik
version: 1.0.0
iteration: 4
epoch: 1
license: MIT
vendor: Emile Vauge
architecture: x86_64
type: rpm
url: https://github.com/EmileVauge/traefik
description: Træfɪk, a modern reverse proxy
# this field means nothing now that they've switched from numbers to git hashes.
# However, we need to keep it around until the version actually changes. Bump
# this and iteration until then.
epoch: 413
dependencies:
- libcap
- traefik-config-scripts >= 1.0.0-3
resources:
- url: https://github.com/containous/traefik/releases/download/v1.0.0/traefik_linux-amd64
hash-type: sha1
hash: fdba2e3f2ec435b30f3bcd963460b659883edb28
targets:
# base
- src: '{{.BuildRoot}}/traefik_linux-amd64'
dest: /usr/bin/{{.Name}}
- src: '{{.SpecRoot}}/{{.Name}}.service'
dest: /etc/systemd/system/{{.Name}}.service
template: yes
- src: "{{empty}}"
dest: /var/log/{{.Name}}
- src: "{{empty}}"
dest: /var/log/{{.Name}}/archive
scripts:
before-install: |
getent group {{.Name}} > /dev/null || groupadd -r {{.Name}}
getent passwd {{.Name}} > /dev/null || \
useradd -r \
-g {{.Name}} \
-d /etc/{{.Name}} \
-s /sbin/nologin \
-c "{{.Name}} user" \
{{.Name}}
after-install: |
chown -R root:root /etc/{{.Name}}
chown -R {{.Name}}:{{.Name}} /var/log/{{.Name}}
setcap 'cap_net_bind_service=+ep' /usr/bin/{{.Name}}
systemctl enable /etc/systemd/system/{{.Name}}.service 2>/dev/null
systemctl start {{.Name}}.service
traefik-global --port=80 --grace-time-out=10
traefik-web --address=:8080
after-upgrade: |
chown -R {{.Name}}:{{.Name}} /var/log/{{.Name}}
setcap 'cap_net_bind_service=+ep' /usr/bin/{{.Name}}
chown -R root:root /etc/traefik
systemctl daemon-reload
systemctl restart {{.Name}}.service
before-remove: |
systemctl stop {{.Name}}.service
systemctl disable {{.Name}}.service 2>/dev/null
after-remove: |
systemctl daemon-reload
extra-args: |
--rpm-os linux
--rpm-auto-add-directories
--rpm-auto-add-exclude-directories /etc/systemd
--rpm-auto-add-exclude-directories /etc/systemd/system