diff --git a/dashboard/backgrounds/scarif.jpg b/dashboard/backgrounds/scarif.jpg new file mode 100644 index 0000000..11ac5c1 Binary files /dev/null and b/dashboard/backgrounds/scarif.jpg differ diff --git a/dashboard/config.ini b/dashboard/config.ini new file mode 100644 index 0000000..421b3a8 --- /dev/null +++ b/dashboard/config.ini @@ -0,0 +1,51 @@ +[Settings] +theme = dark +accent = blueGrey +background = static/images/backgrounds/scarif.jpg +roles = admin +home_access_groups = admin_only +settings_access_groups = admin_only +custom_app_title = Scarif Command +sidebar_default = no_sidebar + +[admin] +role = admin +password = +confirm_password = + +[Tower] +prefix = https:// +url = tower.scarif.local +icon = static/images/apps/nextcloud.png +sidebar_icon = static/images/apps/nextcloud.png +description = Imperial data store +open_in = this_tab + +[Personel] +prefix = https:// +url = personel.scarif.local +icon = static/images/icons/monica.svg +sidebar_icon = static/images/icons/monica.svg +description = Personel manifest +open_in = this_tab + +[Labs] +prefix = https:// +url = labs.scarif.local +icon = static/images/apps/gitea.png +sidebar_icon = static/images/apps/gitea.png +description = Top secret development projects +open_in = this_tab + +[weather] +platform = weather +woeid = 44418 +temp_unit = c +wind_speed_unit = kph +air_pressure_unit = mbar +visibility_unit = km + +[Conditions] +type = custom +data_sources = weather + diff --git a/dashboard/icons/monica.svg b/dashboard/icons/monica.svg new file mode 100644 index 0000000..5c397c7 --- /dev/null +++ b/dashboard/icons/monica.svg @@ -0,0 +1 @@ +Artboard 3.1Created using Figma \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f19973c..b88b25e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,21 @@ +# Options for building certificates +x-certs: &certs + image: paulczar/omgwtfssl + restart: "no" + volumes: + - certs:/certs + version: "3.4" services: + dashboard: + image: rmountjoy/dashmachine:latest + volumes: + - dashboard:/dashmachine/dashmachine/user_data + restart: always + networks: + - nginx + monica: build: ./monica image: monica @@ -107,53 +122,25 @@ services: - monica-data:/var/www/html/monica/storage:ro - nextcloud:/var/www/html/nextcloud:ro depends_on: + - dashboard - monica - nextcloud - gitea - - omgwtfssl-monica - - omgwtfssl-nextcloud - - omgwtfssl-gitea + - certs ports: - 80:80 - 443:443 networks: - nginx - omgwtfssl-monica: - image: paulczar/omgwtfssl - restart: "no" - volumes: - - certs:/certs + certs: + <<: *certs environment: - - SSL_SUBJECT=personel.${DOMAIN} + - SSL_SUBJECT=${DOMAIN} - CA_SUBJECT=chris@${DOMAIN} - - SSL_KEY=/certs/personel.${DOMAIN}.key - - SSL_CSR=/certs/personel.${DOMAIN}.csr - - SSL_CERT=/certs/personel.${DOMAIN}.crt - - omgwtfssl-nextcloud: - image: paulczar/omgwtfssl - restart: "no" - volumes: - - certs:/certs - environment: - - SSL_SUBJECT=tower.${DOMAIN} - - CA_SUBJECT=chris@${DOMAIN} - - SSL_KEY=/certs/tower.${DOMAIN}.key - - SSL_CSR=/certs/tower.${DOMAIN}.csr - - SSL_CERT=/certs/tower.${DOMAIN}.crt - - omgwtfssl-gitea: - image: paulczar/omgwtfssl - restart: "no" - volumes: - - certs:/certs - environment: - - SSL_SUBJECT=labs.${DOMAIN} - - CA_SUBJECT=chris@${DOMAIN} - - SSL_KEY=/certs/labs.${DOMAIN}.key - - SSL_CSR=/certs/labs.${DOMAIN}.csr - - SSL_CERT=/certs/labs.${DOMAIN}.crt + - SSL_KEY=/certs/${DOMAIN}.key + - SSL_CSR=/certs/${DOMAIN}.csr + - SSL_CERT=/certs/${DOMAIN}.crt volumes: db: @@ -162,6 +149,7 @@ volumes: nextcloud: certs: gitea: + dashboard: networks: db: diff --git a/nginx.conf b/nginx.conf index 29b49c3..c8a4b4a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -75,8 +75,8 @@ http { server { listen 443 ssl http2; - ssl_certificate /etc/nginx/certs/personel.scarif.local.crt; - ssl_certificate_key /etc/nginx/certs/personel.scarif.local.key; + ssl_certificate /etc/nginx/certs/scarif.local.crt; + ssl_certificate_key /etc/nginx/certs/scarif.local.key; server_name personel.scarif.local; @@ -211,8 +211,8 @@ http { server { listen 443 ssl http2; - ssl_certificate /etc/nginx/certs/tower.scarif.local.crt; - ssl_certificate_key /etc/nginx/certs/tower.scarif.local.key; + ssl_certificate /etc/nginx/certs/scarif.local.crt; + ssl_certificate_key /etc/nginx/certs/scarif.local.key; server_name tower.scarif.local; @@ -347,8 +347,8 @@ http { server { listen 443 ssl http2; - ssl_certificate /etc/nginx/certs/labs.scarif.local.crt; - ssl_certificate_key /etc/nginx/certs/labs.scarif.local.key; + ssl_certificate /etc/nginx/certs/scarif.local.crt; + ssl_certificate_key /etc/nginx/certs/scarif.local.key; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; @@ -359,4 +359,35 @@ http { proxy_pass http://gitea-handler; } } + + upstream dashboard-handler { + server dashboard:5000; + } + + server { + listen 443 ssl http2; + + ssl_certificate /etc/nginx/certs/scarif.local.crt; + ssl_certificate_key /etc/nginx/certs/scarif.local.key; + + gzip_types text/plain text/css application/json application/x-javascript + text/xml application/xml application/xml+rss text/javascript; + + server_name command.scarif.local scarif.local; + + location / { + proxy_pass http://dashboard-handler; + } + + location /unauthorized { + return 301 https://$host/login; + } + } + + server { + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + return 301 https://$host$request_uri; + } }