forked from openwisp/docker-openwisp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (49 loc) · 1.66 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Find documentation in README.md under
# the heading "Makefile Options".
SHELL := /bin/bash
default: compose-build
# Build
python-build: build.py
python build.py change-secret-key
build-base:
docker build --tag openwisp/openwisp-base:intermedia-system \
--file ./build/openwisp_base/Dockerfile \
--target SYSTEM ./build/
docker build --tag openwisp/openwisp-base:intermedia-python \
--file ./build/openwisp_base/Dockerfile \
--target PYTHON ./build/
docker build --tag openwisp/openwisp-base:latest \
--file ./build/openwisp_base/Dockerfile ./build/
compose-build: python-build build-base
docker-compose build --parallel
python build.py default-secret-key
publish-build: build-base
docker-compose build --parallel
# Test
runtests: develop-runtests
docker-compose stop
develop-runtests: publish-build
docker-compose up -d
source ./tests/tests.sh && init_tests
travis-runtests: publish-build
docker-compose up -d
echo "127.0.0.1 dashboard.openwisp.org controller.openwisp.org" \
"radius.openwisp.org topology.openwisp.org" | sudo tee -a /etc/hosts
source ./tests/tests.sh && init_tests logs
# Development
develop: publish-build
docker-compose up -d
docker-compose logs -f
# Clean
clean:
docker-compose stop
docker-compose down --remove-orphans --volumes --rmi all
docker-compose rm -svf
docker rmi --force openwisp/openwisp-base:latest \
openwisp/openwisp-base:intermedia-system \
openwisp/openwisp-base:intermedia-python \
`docker images -f "dangling=true" -q` || true
# Publish
publish: publish-build develop-runtests
docker push openwisp/openwisp-base:latest
docker-compose push