This repository has been archived on 2023-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
loki/Makefile

144 lines
3.4 KiB
Makefile
Raw Permalink Normal View History

2018-01-24 23:46:39 +01:00
# -----------------------------------------------------------------------------
# Install the service file.
# -----------------------------------------------------------------------------
install:
cp loki-server.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable loki-server
uninstall:
systemctl disable loki-server
rm /lib/systemd/system/loki-server.service
systemctl daemon-reload
# -----------------------------------------------------------------------------
# The container registry to use.
# -----------------------------------------------------------------------------
DOCKER_REGISTRY = registry.wojciechkozlowski.eu/wojtek/loki
# -----------------------------------------------------------------------------
# Default target.
# -----------------------------------------------------------------------------
default: all
# -----------------------------------------------------------------------------
# proxy
# -----------------------------------------------------------------------------
2018-12-18 01:39:51 +01:00
PROXY = $(DOCKER_REGISTRY)/proxy
proxy-clean:
2018-12-18 01:39:51 +01:00
docker rmi $(PROXY) || /bin/true
proxy-build:
2018-12-18 01:39:51 +01:00
docker build -f proxy/Dockerfile -t $(PROXY) ./proxy
proxy-push:
2018-12-18 01:39:51 +01:00
docker push $(PROXY)
proxy-pull:
2018-12-18 01:39:51 +01:00
docker pull $(PROXY)
proxy: proxy-clean proxy-build proxy-push
# -----------------------------------------------------------------------------
2018-12-18 01:39:51 +01:00
# wiki
# -----------------------------------------------------------------------------
2018-12-18 01:39:51 +01:00
WIKI = $(DOCKER_REGISTRY)/wiki
2018-12-18 01:39:51 +01:00
wiki-clean:
docker rmi $(WIKI) || /bin/true
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
wiki-build:
docker build -f dokuwiki/Dockerfile -t $(WIKI) ./dokuwiki
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
wiki-push:
docker push $(WIKI)
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
wiki-pull:
docker pull $(WIKI)
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
wiki: wiki-clean wiki-build wiki-push
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
# -----------------------------------------------------------------------------
# nextcloud
# -----------------------------------------------------------------------------
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
NEXTCLOUD = $(DOCKER_REGISTRY)/nextcloud
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-clean:
docker rmi $(NEXTCLOUD) || /bin/true
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-build:
docker build -f nextcloud/Dockerfile -t $(NEXTCLOUD) ./nextcloud
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-push:
docker push $(NEXTCLOUD)
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-pull:
docker pull $(NEXTCLOUD)
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud: nextcloud-clean nextcloud-build nextcloud-push
2019-03-20 22:43:07 +01:00
#------------------------------------------------------------------------------
# Shadowsocks
#------------------------------------------------------------------------------
SHADOWSOCKS = $(DOCKER_REGISTRY)/shadowsocks
shadowsocks-clean:
docker rmi $(SHADOWSOCKS) || /bin/true
shadowsocks-build:
docker build -f shadowsocks/Dockerfile -t $(SHADOWSOCKS) ./shadowsocks
shadowsocks-push:
docker push $(SHADOWSOCKS)
shadowsocks-pull:
docker pull $(SHADOWSOCKS)
shadowsocks: shadowsocks-clean shadowsocks-build shadowsocks-push
# -----------------------------------------------------------------------------
# Collect targets.
# -----------------------------------------------------------------------------
clean-all:
2018-12-11 20:25:54 +01:00
docker container prune -f
docker image prune -a -f
2018-01-25 22:21:17 +01:00
clean-builds: \
proxy-clean \
2018-12-18 01:39:51 +01:00
wiki-clean \
2019-03-20 22:43:07 +01:00
nextcloud-clean \
shadowsocks-clean
2018-12-18 01:39:51 +01:00
build-all: \
proxy-build \
wiki-build \
2019-03-20 22:43:07 +01:00
nextcloud-build \
shadowsocks-build
2018-12-18 01:39:51 +01:00
push-all: \
proxy-push \
wiki-push \
2019-03-20 22:43:07 +01:00
nextcloud-push \
shadowsocks-push
2018-12-18 01:39:51 +01:00
pull-all: \
proxy-pull \
wiki-pull \
2019-03-20 22:43:07 +01:00
nextcloud-pull \
shadowsocks-pull
# -----------------------------------------------------------------------------
# Clean - build - push
# -----------------------------------------------------------------------------
all: clean-all build-all push-all