https://github.com/vgarvardt/itskrig.com
itskrig.com contents
https://github.com/vgarvardt/itskrig.com
Last synced: 3 days ago
JSON representation
itskrig.com contents
- Host: GitHub
- URL: https://github.com/vgarvardt/itskrig.com
- Owner: vgarvardt
- Created: 2017-05-20T20:53:01.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-12T16:58:36.000Z (about 1 year ago)
- Last Synced: 2025-02-24T05:36:36.812Z (4 months ago)
- Language: Smarty
- Homepage: http://itskrig.com
- Size: 70.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# itskrig.com
> Blog of Vladimir Garvardt built on top of [rKlotz](https://github.com/vgarvardt/rklotz)
## Deploy on Ubuntu 17.04
1. [Install `docker-ce`](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/)
2. Pull latest blog docker image - `docker pull vgarvardt/itskrig.com`
3. Install `runit` - `sudo apt-get install runit runit-systemd`
4. Add new service to `runit` to run teh blog:```bash
sudo -i
# create service dir
mkdir -p /etc/sv/rklotz/log
# create logs dir
mkdir -p /var/log/rklotz
# create logs config
echo "# rotate if log file size > s bytes" > /var/log/rklotz/config
echo "s52428800" >> /var/log/rklotz/config
echo "# keep at most n log files" >> /var/log/rklotz/config
echo "n10" >> /var/log/rklotz/config
# create service run script
echo "#!/bin/sh" > /etc/sv/rklotz/run
echo "exec 2>&1 && docker ps -q | xargs docker kill; docker run -p 80:8080 -p 443:8443 vgarvardt/itskrig.com" >> /etc/sv/rklotz/run
chmod a+x echo "#!/bin/sh" > /etc/sv/rklotz/run
# create service log run script
echo "#!/bin/sh" > /etc/sv/rklotz/log/run
echo "exec svlogd /var/log/rklotz" >> /etc/sv/rklotz/log/run
chmod a+x /etc/sv/rklotz/log/run
# make service active
cd /etc/service
ln -s /etc/sv/rklotz rklotz
```## Update to run the latest version
1. Pull the latest image - `docker pull vgarvardt/itskrig.com`
2. Kill existing running docker image (`runit` will run the new one) - `docker ps -qf "ancestor=vgarvardt/itskrig.com" | xargs docker kill`