Skip to content
Snippets Groups Projects
Commit 69d0805d authored by Felipe Cecagno's avatar Felipe Cecagno
Browse files

implement a Makefile to automate docker images build

parent 232c4857
No related branches found
No related tags found
No related merge requests found
......@@ -92,8 +92,24 @@ $ cd bbb-lti/
$ docker build -t bbb-lti .
```
Build everything with a single command
```
$ cd labs/docker/
$ make release
```
## RUN
Export your configuration as environment variables
```
$ export SERVER_DOMAIN=felipe.dev.mconf.com
$ export EXTERNAL_IP=`dig +short $SERVER_DOMAIN`
$ export SHARED_SECRET=`openssl rand -hex 16`
$ export COTURN_REST_SECRET=`openssl rand -hex 16`
$ export SCREENSHARE_EXTENSION_LINK=https://chrome.google.com/webstore/detail/mconf-screenshare/mbfngdphjegmlbfobcblikeefpidfncb
$ export SCREENSHARE_EXTENSION_KEY=mbfngdphjegmlbfobcblikeefpidfncb
```
Create a volume for the SSL certs
```
......@@ -103,7 +119,6 @@ $ docker volume create docker_ssl-conf
Generate SSL certs
```
$ export SERVER_DOMAIN=felipe.dev.mconf.com
$ docker run --rm -p 80:80 -v docker_ssl-conf:/etc/letsencrypt -it certbot/certbot certonly --non-interactive --register-unsafely-without-email --agree-tos --expand --domain $SERVER_DOMAIN --standalone
# certificate path: docker_ssl-conf/live/$SERVER_DOMAIN/fullchain.pem
......@@ -130,15 +145,14 @@ $ docker stop nginx
```
These are the instructions to run the containers individually
Launch everything with docker compose
```
$ cd labs/docker/
$ docker-compose up
```
$ export SERVER_DOMAIN=felipe.dev.mconf.com
$ export EXTERNAL_IP=`dig +short $SERVER_DOMAIN`
$ export SHARED_SECRET=`openssl rand -hex 16`
$ export COTURN_REST_SECRET=`openssl rand -hex 16`
$ export SCREENSHARE_EXTENSION_LINK=https://chrome.google.com/webstore/detail/mconf-screenshare/mbfngdphjegmlbfobcblikeefpidfncb
$ export SCREENSHARE_EXTENSION_KEY=mbfngdphjegmlbfobcblikeefpidfncb
These are the instructions to run the containers individually
```
$ docker run --rm --name mongo -d mongo:3.4
$ docker run --rm --name redis -d redis
......
SHELL=/bin/bash
# build options
BUILD_VERSION?=0.0.0
BUILD_TAG_PREFIX?=
BUILD_REVISION=`git rev-parse --short HEAD`
BUILD_DIR_BASE=`git rev-parse --git-dir`/..
TAG_REVISION=0
all: release
image:
-cd $(DIR) && docker build -t $(BUILD_TAG_PREFIX)$(BUILD_TAG):$(BUILD_VERSION) $(BUILD_ARGS) .
if [ "$(TAG_REVISION)" == "1" ]; then \
docker tag $(BUILD_TAG_PREFIX)$(BUILD_TAG):$(BUILD_VERSION) $(BUILD_TAG_PREFIX)$(BUILD_TAG):$(BUILD_REVISION) ; \
fi
release:
make image DIR=$(BUILD_DIR_BASE)/labs/docker/sbt BUILD_TAG=sbt BUILD_VERSION=0.13.8
make image DIR=$(BUILD_DIR_BASE)/bbb-common-message BUILD_TAG=bbb-common-message BUILD_VERSION=latest BUILD_ARGS="--build-arg COMMON_VERSION=0.0.1-SNAPSHOT"
make image DIR=$(BUILD_DIR_BASE)/bbb-common-web BUILD_TAG=bbb-common-web BUILD_VERSION=latest BUILD_ARGS="--build-arg COMMON_VERSION=0.0.1-SNAPSHOT"
make image DIR=$(BUILD_DIR_BASE)/bbb-fsesl-client BUILD_TAG=bbb-fsesl-client BUILD_VERSION=latest BUILD_ARGS="--build-arg COMMON_VERSION=0.0.1-SNAPSHOT"
make image DIR=$(BUILD_DIR_BASE)/akka-bbb-apps BUILD_TAG=bbb-apps-akka BUILD_VERSION=latest BUILD_ARGS="--build-arg COMMON_VERSION=0.0.1-SNAPSHOT" TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/akka-bbb-fsesl BUILD_TAG=bbb-fsesl-akka BUILD_VERSION=latest BUILD_ARGS="--build-arg COMMON_VERSION=0.0.1-SNAPSHOT" TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/bigbluebutton-web BUILD_TAG=bbb-web BUILD_VERSION=latest BUILD_ARGS="--build-arg COMMON_VERSION=0.0.1-SNAPSHOT" TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/bigbluebutton-html5 BUILD_TAG=bbb-html5 BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/labs/bbb-webrtc-sfu BUILD_TAG=bbb-webrtc-sfu BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/bbb-webhooks BUILD_TAG=bbb-webhooks BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/labs/docker/kurento BUILD_TAG=kurento BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/labs/docker/freeswitch BUILD_TAG=bbb-freeswitch BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/labs/docker/nginx BUILD_TAG=nginx BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/labs/docker/nginx-dhp BUILD_TAG=nginx-dhp BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/labs/docker/coturn BUILD_TAG=coturn BUILD_VERSION=latest TAG_REVISION=1
make image DIR=$(BUILD_DIR_BASE)/bbb-lti BUILD_TAG=bbb-lti BUILD_VERSION=latest TAG_REVISION=1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment