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
|
|
|
|
|
2019-11-30 12:42:10 +01:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# The container engine to use. Default to docker, but on Fedora must now use
|
|
|
|
# podman.
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
ENGINE = docker
|
|
|
|
|
2018-01-23 23:59:20 +01:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# The container registry to use.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2019-11-30 12:42:10 +01:00
|
|
|
REGISTRY = registry.wojciechkozlowski.eu/wojtek/loki
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Default target.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
2019-07-28 18:52:37 +02:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# html
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2019-11-30 12:42:10 +01:00
|
|
|
HTML = $(REGISTRY)/html
|
2019-07-28 18:52:37 +02:00
|
|
|
|
|
|
|
html-clean:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) rmi $(HTML) || /bin/true
|
2019-07-28 18:52:37 +02:00
|
|
|
|
|
|
|
html-build:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) build -f html/Dockerfile -t $(HTML) ./html
|
2019-07-28 18:52:37 +02:00
|
|
|
|
|
|
|
html-push:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) push $(HTML)
|
2019-07-28 18:52:37 +02:00
|
|
|
|
|
|
|
html-pull:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) pull $(HTML)
|
2019-07-28 18:52:37 +02:00
|
|
|
|
|
|
|
html: html-clean html-build html-push
|
|
|
|
|
2018-01-23 23:59:20 +01:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# proxy
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2019-11-30 12:42:10 +01:00
|
|
|
PROXY = $(REGISTRY)/proxy
|
2018-12-18 01:39:51 +01:00
|
|
|
|
2018-01-23 23:59:20 +01:00
|
|
|
proxy-clean:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) rmi $(PROXY) || /bin/true
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
proxy-build:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) build -f proxy/Dockerfile -t $(PROXY) ./proxy
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
proxy-push:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) push $(PROXY)
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
proxy-pull:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) pull $(PROXY)
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
proxy: proxy-clean proxy-build proxy-push
|
|
|
|
|
2018-12-18 01:39:51 +01:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# nextcloud
|
|
|
|
# -----------------------------------------------------------------------------
|
2018-01-25 22:21:17 +01:00
|
|
|
|
2019-11-30 12:42:10 +01:00
|
|
|
NEXTCLOUD = $(REGISTRY)/nextcloud
|
2018-01-25 22:21:17 +01:00
|
|
|
|
2018-12-18 01:39:51 +01:00
|
|
|
nextcloud-clean:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) rmi $(NEXTCLOUD) || /bin/true
|
2018-01-25 22:21:17 +01:00
|
|
|
|
2018-12-18 01:39:51 +01:00
|
|
|
nextcloud-build:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) 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:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) push $(NEXTCLOUD)
|
2018-01-25 22:21:17 +01:00
|
|
|
|
2018-12-18 01:39:51 +01:00
|
|
|
nextcloud-pull:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) 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
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Collect targets.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
clean-all:
|
2019-11-30 12:42:10 +01:00
|
|
|
$(ENGINE) container prune -f
|
|
|
|
$(ENGINE) image prune -a -f
|
2018-01-23 23:59:20 +01:00
|
|
|
|
2018-01-25 22:21:17 +01:00
|
|
|
clean-builds: \
|
2019-07-28 18:52:37 +02:00
|
|
|
html-clean \
|
2018-01-25 22:21:17 +01:00
|
|
|
proxy-clean \
|
2019-07-28 11:02:11 +02:00
|
|
|
nextcloud-clean
|
2018-12-18 01:39:51 +01:00
|
|
|
|
|
|
|
build-all: \
|
2019-07-28 18:52:37 +02:00
|
|
|
html-build \
|
2018-12-18 01:39:51 +01:00
|
|
|
proxy-build \
|
2019-07-28 11:02:11 +02:00
|
|
|
nextcloud-build
|
2018-12-18 01:39:51 +01:00
|
|
|
|
|
|
|
push-all: \
|
2019-07-28 18:52:37 +02:00
|
|
|
html-push \
|
2018-12-18 01:39:51 +01:00
|
|
|
proxy-push \
|
2019-07-28 11:02:11 +02:00
|
|
|
nextcloud-push
|
2018-12-18 01:39:51 +01:00
|
|
|
|
|
|
|
pull-all: \
|
2019-07-28 18:52:37 +02:00
|
|
|
html-pull \
|
2018-12-18 01:39:51 +01:00
|
|
|
proxy-pull \
|
2019-07-28 11:02:11 +02:00
|
|
|
nextcloud-pull
|
2018-01-23 23:59:20 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Clean - build - push
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
all: clean-all build-all push-all
|