-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMakefile
56 lines (47 loc) · 1.79 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
OESS_VERSION=2.0.17
OESS_NETWORK=oess
TEST_FILES=
include .env
build:
htpasswd -b -c frontend/.htpasswd admin "${OESS_PASS}"
docker build . -f frontend/Dockerfile -t oess-frontend
docker build . -f app/mpls/Dockerfile.discovery -t oess-netconf-discovery
docker build . -f app/mpls/Dockerfile.fwdctl -t oess-netconf-fwdctl
start:
docker stack deploy oess-dev --compose-file docker-compose.development.yml
stop:
docker stack rm oess-dev
test:
docker build . -f Dockerfile -t oess-test
docker run --rm -it -e OESS_TEST_FILES="$(TEST_FILES)" --volume ${PWD}/perl-lib/OESS:/perl-lib/OESS oess-test
# For single container builds. Should only be used for testing.
# To attach OESS to an existing docker network:
# --network ${OESS_NETWORK}
#
# Allow container to attach to host port via host.docker.internal hostname:
# --add-host=host.docker.internal:host-gateway
#
# To support packet captures:
# --cap-add=NET_RAW
# --cap-add=NET_ADMIN
#
dev:
docker build --no-cache -f Dockerfile.dev --tag oess:${OESS_VERSION} .
docker run -it \
--name oess-dev \
--rm \
--env-file .env \
--publish 8080:80 \
--publish 5672:5672 \
--add-host=host.docker.internal:host-gateway \
--mount type=bind,src=${PWD}/perl-lib/OESS/lib/OESS,dst=/usr/share/perl5/vendor_perl/OESS \
--mount type=bind,src=${PWD}/frontend,dst=/usr/share/oess-frontend \
--mount type=bind,src=${PWD}/perl-lib/OESS/share,dst=/usr/share/doc/perl-OESS-${OESS_VERSION}/share \
--mount type=bind,src=${PWD}/perl-lib/OESS/t,dst=/usr/share/doc/perl-OESS-${OESS_VERSION}/t \
--mount type=bind,src=${PWD}/app,dst=/usr/bin/oess \
--mount type=bind,src=${PWD}/docs,dst=/docs \
--mount type=bind,src=${PWD}/perl-lib/OESS/etc,dst=/usr/share/oess-core \
--hostname ${MAILHOST} \
oess:${OESS_VERSION} /bin/bash
documentation:
perl docs/generate-webservice-docs.pl