Skip to content

Commit f83b5b7

Browse files
committed
add giles unit file
1 parent c5085e6 commit f83b5b7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

giles.service

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[Unit]
2+
Description=Giles
3+
After=mongo.service
4+
After=btrdb.service
5+
6+
7+
[Service]
8+
Restart=always
9+
RestartSec=1m
10+
ExecStartPre=/usr/bin/docker pull gtfierro/giles
11+
12+
ExecStart=/bin/bash -c "/usr/bin/docker run \
13+
--name %p \
14+
--net local \
15+
--add-host=parent:$(/sbin/ip route show | /bin/grep docker0 | /usr/bin/awk '{print $9}') \
16+
-e BTRDB_SERVER=btrdb.local:4410 \
17+
-e MONGO_SERVER=mongo.local:27017 \
18+
-e GILES_BW_ENTITY=<entity file> \
19+
-e GILES_BW_NAMESPACE=scratch.ns \
20+
-e GILES_BW_LISTEN=scratch.ns \
21+
-v /etc/giles:/etc/giles \
22+
gtfierro/giles"
23+
24+
ExecStop=/usr/bin/docker stop -t 30 %p ; /usr/bin/docker rm -f %p
25+
26+
[Install]
27+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)