mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-22 13:01:06 -05:00
Service file to spin up Docker container
This commit is contained in:
@@ -49,13 +49,13 @@ Save that SECRETEXAMPLESTRING to secret.php:
|
|||||||
$bearer_token = 'SECRETEXAMPLESTRING';
|
$bearer_token = 'SECRETEXAMPLESTRING';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
# nginx configuration
|
|
||||||
|
|
||||||
See <https://github.com/kaihendry/greptweet/blob/master/nginx.conf>
|
|
||||||
|
|
||||||
# Daily backup
|
# Daily backup
|
||||||
|
|
||||||
<http://backup.greptweet.com/tweets.tar>
|
<http://backup.greptweet.com/tweets.tar>
|
||||||
|
|
||||||
@daily cd /srv/www/greptweet.com && git describe --always > version.txt
|
@daily cd /srv/www/greptweet.com && git describe --always > version.txt
|
||||||
@daily find /srv/www/greptweet.com/u/ -name '*.gz' -type f -print0 | tar cf /srv/www/backup.greptweet.com/tweets.tar --null -T -
|
@daily find /srv/www/greptweet.com/u/ -name '*.gz' -type f -print0 | tar cf /srv/www/backup.greptweet.com/tweets.tar --null -T -
|
||||||
|
|
||||||
|
# Setting up the hosting environment
|
||||||
|
|
||||||
|
<http://dabase.com/blog/Experiencing_CoreOS+Docker/>
|
||||||
|
|||||||
15
greptweet.service
Normal file
15
greptweet.service
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
# https://docs.docker.com/articles/host_integration/
|
||||||
|
# https://coreos.com/docs/launching-containers/launching/getting-started-with-systemd/
|
||||||
|
Description=Greptweet
|
||||||
|
After=docker.service
|
||||||
|
Requires=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
|
ExecStartPre=-/usr/bin/docker kill greptweet1
|
||||||
|
ExecStartPre=-/usr/bin/docker rm greptweet1
|
||||||
|
ExecStart=/usr/bin/docker run --name greptweet1 -v /srv/www/greptweet.com:/srv/http/u -p 80:80 greptweet
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user