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

187 lines
4.6 KiB
Makefile
Raw 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
# -----------------------------------------------------------------------------
# wiki
# -----------------------------------------------------------------------------
wiki-clean:
docker rmi $(DOCKER_REGISTRY)/wiki || /bin/true
2018-12-11 21:34:04 +01:00
wiki-build:
docker-compose build wiki
wiki-push:
docker-compose push wiki
wiki-pull:
docker-compose pull wiki
wiki: wiki-clean wiki-build wiki-push
# -----------------------------------------------------------------------------
2018-12-11 22:11:50 +01:00
# nextcloud
# -----------------------------------------------------------------------------
2018-12-11 22:11:50 +01:00
nextcloud-clean:
docker rmi $(DOCKER_REGISTRY)/nextcloud || /bin/true
2018-12-11 22:11:50 +01:00
nextcloud-build:
docker-compose build nextcloud-app
2018-12-11 22:11:50 +01:00
nextcloud-push:
docker-compose push nextcloud-app
2018-12-11 22:11:50 +01:00
nextcloud-pull:
docker-compose pull nextcloud-app
2018-12-11 22:11:50 +01:00
nextcloud: nextcloud-clean nextcloud-build nextcloud-push
# -----------------------------------------------------------------------------
# proxy
# -----------------------------------------------------------------------------
proxy-clean:
docker rmi $(DOCKER_REGISTRY)/proxy || /bin/true
proxy-build:
docker-compose build proxy
proxy-push:
docker-compose push proxy
proxy-pull:
docker-compose pull proxy
proxy: proxy-clean proxy-build proxy-push
# -----------------------------------------------------------------------------
2018-01-25 22:21:17 +01:00
# runners
# -----------------------------------------------------------------------------
2018-01-25 22:21:17 +01:00
# base ------------------------------------------------------------------------
2018-01-25 22:21:17 +01:00
runner-base-clean:
docker rmi $(DOCKER_REGISTRY)/runner-base || /bin/true
2018-12-11 21:34:04 +01:00
runner-base-build:
2018-01-25 22:21:17 +01:00
docker build -f runner/Dockerfile \
-t $(DOCKER_REGISTRY)/runner-base \
./runner
runner-base-push:
docker push $(DOCKER_REGISTRY)/runner-base
runner-base-pull:
docker pull $(DOCKER_REGISTRY)/runner-base
runner-base: runner-base-clean runner-base-build runner-base-push
# main ------------------------------------------------------------------------
runner-main-clean:
docker rmi $(DOCKER_REGISTRY)/runner-main || /bin/true
runner-main-build: runner-base-build
2018-01-25 15:39:34 +01:00
docker-compose build runner-main
2018-01-25 22:21:17 +01:00
runner-main-push:
2018-01-25 15:39:34 +01:00
docker-compose push runner-main
2018-01-25 22:21:17 +01:00
runner-main-pull:
2018-01-25 15:39:34 +01:00
docker-compose pull runner-main
2018-01-25 22:21:17 +01:00
runner-main: runner-main-clean runner-main-build runner-main-push
# docker ----------------------------------------------------------------------
runner-docker-clean:
docker rmi $(DOCKER_REGISTRY)/runner-docker || /bin/true
runner-docker-build: runner-base-build
docker-compose build runner-docker
runner-docker-push:
docker-compose push runner-docker
runner-docker-pull:
docker-compose pull runner-docker
runner-docker: runner-docker-clean runner-docker-build runner-docker-push
# collect ---------------------------------------------------------------------
runners-clean: \
runner-base-clean \
runner-main-clean \
runner-docker-clean
runners-build: \
runner-base-build \
runner-main-build \
runner-docker-build
runners-push: \
runner-main-push \
runner-docker-push
runners-pull: \
runner-main-pull \
runner-docker-pull
runners: runners-clean runners-build runners-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: \
wiki-clean \
2018-12-11 22:11:50 +01:00
nextcloud-clean \
2018-01-25 22:21:17 +01:00
proxy-clean \
runner-base-clean \
runner-main-clean \
runner-docker-clean
2018-12-11 21:34:04 +01:00
build-all: runner-base-build
docker-compose build
push-all:
docker-compose push
pull-all:
docker-compose pull
# -----------------------------------------------------------------------------
# Clean - build - push
# -----------------------------------------------------------------------------
all: clean-all build-all push-all