diff --git a/Dockerfile.riot b/Dockerfile.riot new file mode 100644 index 0000000..81438d3 --- /dev/null +++ b/Dockerfile.riot @@ -0,0 +1,10 @@ +ARG riot_version=latest +FROM vectorim/riot-web:${riot_version} + +COPY config.riot.json /app/config.json + +# Custom Branding +RUN rm -rf /app/themes/riot/ +COPY /branding/themes/riot/ /app/themes/ +RUN rm -f /app/welcome/images/logo.svg +COPY /branding/themes/riot/img/logos/riot-im-logo.svg /app/welcome/images/logo.svg diff --git a/Makefile b/Makefile index ca13a6f..1b6afab 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,18 @@ DOCKER_REVISION ?= matrix-testing-$(USER) -DOCKER_TAG = docker-push.ocf.berkeley.edu/synapse:$(DOCKER_REVISION) +SYNAPSE_DOCKER_TAG = docker-push.ocf.berkeley.edu/synapse:$(DOCKER_REVISION) +RIOT_DOCKER_TAG = docker-push.ocf.berkeley.edu/riot:$(DOCKER_REVISION) RANDOM_PORT := $(shell expr $$(( 8000 + (`id -u` % 1000) + 2 ))) SYNAPSE_VERSION := v1.9.1-py3 +RIOT_VERSION := v1.5.15 .PHONY: cook-image cook-image: - docker build --build-arg synapse_version=$(SYNAPSE_VERSION) --pull -t $(DOCKER_TAG) . + docker build --build-arg synapse_version=$(SYNAPSE_VERSION) --pull -t $(SYNAPSE_DOCKER_TAG) . + docker build -f Dockerfile.riot --build-arg riot_version=$(RIOT_VERSION) --pull -t $(RIOT_DOCKER_TAG) . .PHONY: push-image push-image: - docker push $(DOCKER_TAG) + docker push $(SYNAPSE_DOCKER_TAG) + docker push $(RIOT_DOCKER_TAG) diff --git a/branding/themes/riot/img/backgrounds/valley.jpg b/branding/themes/riot/img/backgrounds/valley.jpg new file mode 100644 index 0000000..5cf261e Binary files /dev/null and b/branding/themes/riot/img/backgrounds/valley.jpg differ diff --git a/branding/themes/riot/img/logos/riot-im-logo-black-text.png b/branding/themes/riot/img/logos/riot-im-logo-black-text.png new file mode 100644 index 0000000..5dbc739 Binary files /dev/null and b/branding/themes/riot/img/logos/riot-im-logo-black-text.png differ diff --git a/branding/themes/riot/img/logos/riot-im-logo-black-text.svg b/branding/themes/riot/img/logos/riot-im-logo-black-text.svg new file mode 100644 index 0000000..2c03b45 --- /dev/null +++ b/branding/themes/riot/img/logos/riot-im-logo-black-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/themes/riot/img/logos/riot-im-logo.png b/branding/themes/riot/img/logos/riot-im-logo.png new file mode 100644 index 0000000..5dbc739 Binary files /dev/null and b/branding/themes/riot/img/logos/riot-im-logo.png differ diff --git a/branding/themes/riot/img/logos/riot-im-logo.svg b/branding/themes/riot/img/logos/riot-im-logo.svg new file mode 100644 index 0000000..2c03b45 --- /dev/null +++ b/branding/themes/riot/img/logos/riot-im-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/config.riot.json b/config.riot.json new file mode 100644 index 0000000..bd6bd85 --- /dev/null +++ b/config.riot.json @@ -0,0 +1,45 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://matrix.ocf.berkeley.edu", + "server_name": "matrix.ocf.berkeley.edu" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } + }, + "disable_identity_server": false, + "disable_custom_urls": false, + "disable_guests": true, + "disable_login_language_selector": false, + "disable_3pid_login": false, + "brand": "OCF Chat", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "defaultCountryCode": "GB", + "showLabsSettings": true, + "features": { + "feature_pinning": "labs", + "feature_custom_status": "labs", + "feature_custom_tags": "labs", + "feature_state_counters": "labs", + "feature_many_integration_managers": "labs", + "feature_mjolnir": "labs", + "feature_dm_verification": "labs", + "feature_cross_signing": "labs" + }, + "default_federate": true, + "welcomePageUrl": "home.html", + "default_theme": "dark", + "roomDirectory": { + "servers": [ + "matrix.ocf.berkeley.edu", + "matrix.org" + ] + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false + } +} \ No newline at end of file diff --git a/kubernetes/riot.yml.erb b/kubernetes/riot.yml.erb new file mode 100644 index 0000000..a11f81a --- /dev/null +++ b/kubernetes/riot.yml.erb @@ -0,0 +1,55 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: riot + name: riot +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: riot + type: ClusterIP +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: riot + name: riot +spec: + replicas: 1 + selector: + matchLabels: + app: riot + template: + metadata: + labels: + app: riot + spec: + containers: + - image: "docker.ocf.berkeley.edu/riot:<%= version %>" + imagePullPolicy: IfNotPresent + name: riot-web + readinessProbe: + tcpSocket: + port: 80 + restartPolicy: Always +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + labels: + app: riot + name: vhost-ingress +spec: + rules: + - host: chat.ocf.berkeley.edu + http: + paths: + - backend: + serviceName: riot + servicePort: 80