diff --git a/DOCKER.md b/labs/docker/README.md similarity index 95% rename from DOCKER.md rename to labs/docker/README.md index 75836ffaaafe2e73b97258d7ee43f14a6f5a09d3..efd26d837723ebfc1efcb6539bc48a9bcd9ab28c 100644 --- a/DOCKER.md +++ b/labs/docker/README.md @@ -1,4 +1,4 @@ -## Build +## Build images individually sbt is needed to build the Scala components ``` @@ -92,13 +92,17 @@ $ cd bbb-lti/ $ docker build -t bbb-lti . ``` +## Build all + Build everything with a single command ``` $ cd labs/docker/ $ make release ``` -## RUN +## Run + +### Setup Export your configuration as environment variables ``` @@ -108,6 +112,8 @@ $ 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 +$ export TAG_PREFIX=fcecagno/bigbluebutton: +$ export TAG_SUFFIX= ``` Create a volume for the SSL certs @@ -145,13 +151,17 @@ $ docker stop nginx ``` +### Launch with docker-compose + Launch everything with docker compose ``` $ cd labs/docker/ $ docker-compose up ``` -These are the instructions to run the containers individually +### Launch without docker-compose + +These are the instructions to run the containers individually, in order ``` $ docker run --rm --name mongo -d mongo:3.4 diff --git a/labs/docker/docker-compose.yml b/labs/docker/docker-compose.yml index 875777117c5fd1a5557930c4e798febf8f6450a0..760a207d3a544fa60a4181e08c4ee3ab28bf2db5 100644 --- a/labs/docker/docker-compose.yml +++ b/labs/docker/docker-compose.yml @@ -1,12 +1,5 @@ version: '2' -# 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 - services: mongo: image: mongo:3.4 @@ -17,7 +10,7 @@ services: restart: unless-stopped bbb-html5: - image: bbb-html5 + image: ${TAG_PREFIX}bbb-html5${TAG_SUFFIX} restart: unless-stopped links: - mongo @@ -29,7 +22,7 @@ services: ROOT_URL: http://127.0.0.1/html5client bbb-webhooks: - image: bbb-webhooks + image: ${TAG_PREFIX}bbb-webhooks${TAG_SUFFIX} restart: unless-stopped links: - redis @@ -38,13 +31,13 @@ services: SHARED_SECRET: ${SHARED_SECRET} bbb-freeswitch: - image: bbb-freeswitch + image: ${TAG_PREFIX}bbb-freeswitch${TAG_SUFFIX} restart: unless-stopped links: - coturn bbb-webrtc-sfu: - image: bbb-webrtc-sfu + image: ${TAG_PREFIX}bbb-webrtc-sfu${TAG_SUFFIX} restart: unless-stopped links: - redis @@ -55,7 +48,7 @@ services: REDIS_HOST: redis coturn: - image: coturn + image: ${TAG_PREFIX}coturn${TAG_SUFFIX} restart: unless-stopped volumes: - ssl-conf:/etc/nginx/ssl @@ -75,14 +68,14 @@ services: - 5349:5349/tcp kurento: - image: kurento + image: ${TAG_PREFIX}kurento${TAG_SUFFIX} restart: unless-stopped environment: KMS_STUN_IP: ${EXTERNAL_IP} KMS_STUN_PORT: 3478 bbb-apps-akka: - image: bbb-apps-akka + image: ${TAG_PREFIX}bbb-apps-akka${TAG_SUFFIX} restart: unless-stopped links: - redis @@ -90,7 +83,7 @@ services: JAVA_OPTS: -Dredis.host=redis bbb-fsesl-akka: - image: bbb-fsesl-akka + image: ${TAG_PREFIX}bbb-fsesl-akka${TAG_SUFFIX} restart: unless-stopped links: - bbb-freeswitch @@ -99,7 +92,7 @@ services: JAVA_OPTS: -Dredis.host=redis -Dfreeswitch.esl.host=bbb-freeswitch bbb-web: - image: bbb-web + image: ${TAG_PREFIX}bbb-web${TAG_SUFFIX} restart: unless-stopped links: - redis @@ -123,7 +116,7 @@ services: # - db-greenlight:/usr/src/app/db/production nginx: - image: nginx + image: ${TAG_PREFIX}nginx${TAG_SUFFIX} restart: unless-stopped links: - bbb-webhooks diff --git a/labs/docker/nginx-dhp/Dockerfile b/labs/docker/nginx-dhp/Dockerfile index 591d34c9acac937d11defb67151f957213db267b..45632665f28be90b9793b578d7389f587f23def2 100644 --- a/labs/docker/nginx-dhp/Dockerfile +++ b/labs/docker/nginx-dhp/Dockerfile @@ -2,6 +2,6 @@ FROM tannerfe/alpine-openssl WORKDIR /root -COPY entrypoint.sh /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ CMD ["docker-entrypoint.sh"]