Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wehealtheme #7096

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
electron_app/dist/
lib/
node_modules/
webapp/
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Multistage Docker Build for aloha-talk-web
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds

FROM docker.io/node:carbon AS build

WORKDIR /aloha/build

COPY . .

RUN npm install

RUN npm run build

FROM docker.io/nginx:1.15-alpine AS install

# Use a build time arg to set target context: --build-arg context=<kubernetes context>
ARG context=minikube

WORKDIR /aloha/aloha-talk

COPY --from=build /aloha/build/devops/nginx/nginx.conf /etc/nginx/nginx.conf

COPY --from=build /aloha/build/webapp .

COPY --from=build /aloha/build/devops/contexts/${context}/config.localhost.json .
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#===============================================================================
# aloha-network-web Development
# This makefile is for use within a local development context.
#===============================================================================
ALOHA_TALK = aloha-talk-web
ALOHA_TALK_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BUILD_TAG ?= latest
ALOHA_TALK_IMAGE := $(ALOHA_TALK):$(BUILD_TAG)

build-talk: ## build docker image
docker build -t $(ALOHA_TALK_IMAGE) $(ALOHA_TALK_DIR)

push-talk: ## tag and push to image repository
docker tag $(ALOHA_TALK_IMAGE) gcr.io/aloha-internal/$(ALOHA_TALK_IMAGE)
docker push gcr.io/aloha-internal/$(ALOHA_TALK_IMAGE)

clean-talk: ## clean build artifacts
rm -rf $(ALOHA_TALK_DIR)/node_modules
rm -rf $(ALOHA_TALK_DIR)/lib
rm -rf $(ALOHA_TALK_DIR)/webapp
rm -rf $(ALOHA_TALK_DIR)/electron_app/dist

### Kubernetes Deployment
CONTEXT ?= minikube

deploy-talk:
kubectl --context=$(CONTEXT) \
apply -f $(ALOHA_TALK_DIR)/devops/contexts/$(CONTEXT)/deployment.yml

undeploy-talk:
kubectl --context=$(CONTEXT) \
delete deployment $(ALOHA_TALK)
25 changes: 25 additions & 0 deletions devops/contexts/minikube/config.localhost.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"default_hs_url": "https://localhost:8448",
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
"brand": "Aloha Health Network",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_groups": "labs",
"feature_pinning": "labs"
},
"default_federate": true,
"welcomePageUrl": "home.html",
"default_theme": "blue",
"roomDirectory": {
"servers": ["localhost"]
},
"welcomeUserId": "@aloha:localhost",
"enable_presence_by_hs_url": {
"https://localhost:8448": false
}
}
66 changes: 66 additions & 0 deletions devops/contexts/minikube/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#===============================================================================
# aloha-talk-web Development Configuration
#
# This collection of yaml documents is for use within a local minikube
# deployment context. You can modify them and safely reconfigure kubernetes at
# any time with the command:
# kubectl apply --context=my_context --namespace=namespace -f ./deployment.yml
#===============================================================================
---
# aloha-talk-web Service
# https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/
apiVersion: v1
kind: Service
metadata:
labels:
app: aloha-talk-web
name: aloha-talk-web
selfLink: /api/v1/namespaces/default/services/aloha-talk-web
spec:
ports:
- name: http
protocol: TCP
targetPort: http # named container port
port: 8080 # external service port
nodePort: 30080 # external node (host) port
- name: https
targetPort: https # named container port
port: 8443 # external service port
nodePort: 30443 # external node (host) port
selector:
app: aloha-talk-web
sessionAffinity: None
type: NodePort
---
# aloha-talk-web Deployment
# https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
apiVersion: apps/v1
kind: Deployment
metadata:
name: aloha-talk-web
spec:
selector:
matchLabels:
app: aloha-talk-web
replicas: 1
template:
metadata:
labels:
app: aloha-talk-web
spec:
imagePullSecrets:
- name: aloha-gcr-io
containers:
- name: aloha-talk-web
## Use the container registry image by default
image: gcr.io/aloha-internal/aloha-talk-web:latest
imagePullPolicy: Always
## Use the local image when developing
# image: aloha-talk-web:latest
# imagePullPolicy: Never
env:
ports:
- containerPort: 8080
name: http
- containerPort: 8443
name: https
77 changes: 77 additions & 0 deletions devops/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#user nginx:nginx;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

gzip on;

server {
listen 8080;
server_name localhost;

#access_log logs/host.access.log main;

location / {
root /aloha/aloha-talk;
index index.html index.js;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root html;
#}
}

# HTTPS server
#
#server {
# listen 8443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

#include servers/*;
}
2 changes: 1 addition & 1 deletion docs/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Theming Riot
============

Themes are a very basic way of providing simple alternative look & feels to the
riot-web app via CSS & custom imagery.
riot-web app via CSS & custom imagery.

They are *NOT* co be confused with 'skins', which describe apps which sit on top
of matrix-react-sdk - e.g. in theory Riot itself is a react-sdk skin.
Expand Down
35 changes: 35 additions & 0 deletions electron_app/riot.im/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,38 @@
"https://matrix.org": false
}
}

{
"default_hs_url": "https://matrix.org",
"default_is_url": "https://vector.im",
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
"brand": "Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_groups": "labs",
"feature_pinning": "labs"
},
"default_federate": true,
"welcomePageUrl": "home.html",
"default_theme": "blue",
"roomDirectory": {
"servers": [
"matrix.org"
]
},
"welcomeUserId": "@riot-bot:matrix.org",
"piwik": {
"url": "https://piwik.riot.im/",
"whitelistedHSUrls": ["https://matrix.org"],
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
"siteId": 1
},
"enable_presence_by_hs_url": {
"https://matrix.org": false
}
}
Loading