Added custom docker for jitsi/web

This commit is contained in:
Clemens Geibel 2022-04-08 14:36:18 +02:00
parent 0120f0b45c
commit 6f5dd1403f
7 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,49 @@
from os import environ
from pybuilder.core import task, init
from ddadevops import *
import logging
name = 'c4k-cloud'
MODULE = 'docker'
PROJECT_ROOT_PATH = '../..'
class MyBuild(DevopsDockerBuild):
pass
@init
def initialize(project):
project.build_depends_on('ddadevops>=0.12.7')
stage = 'notused'
dockerhub_user = environ.get('DOCKERHUB_USER')
if not dockerhub_user:
dockerhub_user = gopass_field_from_path('meissa/web/docker.com', 'login')
dockerhub_password = environ.get('DOCKERHUB_PASSWORD')
if not dockerhub_password:
dockerhub_password = gopass_password_from_path('meissa/web/docker.com')
config = create_devops_docker_build_config(
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
build = MyBuild(project, config)
build.initialize_build_dir()
@task
def image(project):
build = get_devops_build(project)
build.image()
@task
def drun(project):
build = get_devops_build(project)
build.drun()
@task
def test(project):
build = get_devops_build(project)
build.test()
@task
def publish(project):
build = get_devops_build(project)
build.dockerhub_login()
build.dockerhub_publish()

View file

@ -0,0 +1,7 @@
FROM jitsi/web:stable-6826
# Prepare Entrypoint Script
ADD resources /tmp
RUN /tmp/install.sh
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -0,0 +1,20 @@
#!/bin/sh
set -eu
echo "
config.disableThirdPartyRequests = true;
config.defaultLanguage = 'de';
config.resolution = 480;
config.constraints.video = {
aspectRatio: 16 / 9,
height: {
ideal: 480,
max: 480,
min: 240
}
config.channelLastN = 8;
config.enableLayerSuspension = true;
config.disableAudioLevels = true;
" >> /config/config.js
/init

View file

@ -0,0 +1,3 @@
#!/bin/bash
apt update && apt -qqy install vim bash-completion less

View file

@ -0,0 +1,7 @@
#!/bin/bash
set -Eeo pipefail
apt update > /dev/null
install -m 0700 /tmp/install-debug.sh /usr/local/bin/
install -m 0755 /tmp/entrypoint.sh /

View file

@ -0,0 +1,11 @@
FROM meissa-cloud-app
RUN apt update
RUN mkdir /usr/share/man/man1/
RUN apt -yqq install --no-install-recommends --yes curl default-jre-headless
RUN curl -L -o /tmp/serverspec.jar https://github.com/DomainDrivenArchitecture/dda-serverspec-crate/releases/download/2.0.0/dda-serverspec-standalone.jar
COPY serverspec.edn /tmp/serverspec.edn
RUN java -jar /tmp/serverspec.jar /tmp/serverspec.edn -v

View file

@ -0,0 +1 @@
{:file [{:path "/entrypoint.sh" :mod "755"}]}