From 5caf3ae773a9854450beb6db6cd2bcd482317859 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 21 Apr 2024 16:32:48 -0400 Subject: [PATCH] Focalboard --- .DS_Store | Bin 6148 -> 0 bytes docker-compose.production.yml | 12 +-- docker-compose.staging.yml | 12 +-- docker/db/Dockerfile | 1 + docker/db/Dockerfile.production | 1 + docker/focalboard/Dockerfile | 1 + docker/focalboard/Dockerfile.production | 1 + docker/loki/Dockerfile | 1 - docker/loki/Dockerfile.production | 1 - docker/{grafana => nginx}/Dockerfile | 0 .../{grafana => nginx}/Dockerfile.production | 0 docker/{grafana => nginx}/dashboards.yaml | 0 .../dashboards/dashboard.json | 0 docker/{grafana => nginx}/datasources.yaml | 0 docker/{grafana => nginx}/grafana.ini | 0 stack.production.yml | 67 ++++++++------- stack.staging.yml | 77 +++++++++++------- 17 files changed, 103 insertions(+), 71 deletions(-) delete mode 100644 .DS_Store create mode 100644 docker/db/Dockerfile create mode 100644 docker/db/Dockerfile.production create mode 100644 docker/focalboard/Dockerfile create mode 100644 docker/focalboard/Dockerfile.production delete mode 100644 docker/loki/Dockerfile delete mode 100644 docker/loki/Dockerfile.production rename docker/{grafana => nginx}/Dockerfile (100%) rename docker/{grafana => nginx}/Dockerfile.production (100%) rename docker/{grafana => nginx}/dashboards.yaml (100%) rename docker/{grafana => nginx}/dashboards/dashboard.json (100%) rename docker/{grafana => nginx}/datasources.yaml (100%) rename docker/{grafana => nginx}/grafana.ini (100%) diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 6823d8e279b80fd2c8d5b369c5d025faa5297fec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKI|>3Z5S>vG!N$@uSMUZw^aOhWLB&E*5VYRPb9pr1d>UQtw2?P3dC6p6LSC`6 zBO*G#Y-S=85gEY^sAlb| WO>6_5j=0l-{24G^XjI_W3OoSIFcp>n diff --git a/docker-compose.production.yml b/docker-compose.production.yml index e16af7b..fd835ed 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,12 +1,12 @@ version: "3.9" services: - loki: + focalboard: build: - context: docker/loki + context: docker/focalboard dockerfile: Dockerfile.production - image: git.nixc.us/nixius/loki:production-loki - grafana: + image: git.nixc.us/nixius/focalboard:production-focalboard + db: build: - context: docker/grafana + context: docker/db dockerfile: Dockerfile.production - image: git.nixc.us/nixius/loki:production-grafana \ No newline at end of file + image: git.nixc.us/nixius/focalboard:production-db \ No newline at end of file diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index 4377da7..d1edcb0 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -1,12 +1,12 @@ version: "3.9" services: - loki: + focalboard: build: - context: docker/loki + context: docker/focalboard dockerfile: Dockerfile - image: git.nixc.us/nixius/loki:staging-loki - grafana: + image: git.nixc.us/nixius/focalboard:staging-focalboard + db: build: - context: docker/grafana + context: docker/db dockerfile: Dockerfile - image: git.nixc.us/nixius/loki:staging-grafana \ No newline at end of file + image: git.nixc.us/nixius/focalboard:staging-db \ No newline at end of file diff --git a/docker/db/Dockerfile b/docker/db/Dockerfile new file mode 100644 index 0000000..0cda63a --- /dev/null +++ b/docker/db/Dockerfile @@ -0,0 +1 @@ +FROM postgres:latest \ No newline at end of file diff --git a/docker/db/Dockerfile.production b/docker/db/Dockerfile.production new file mode 100644 index 0000000..12a07d7 --- /dev/null +++ b/docker/db/Dockerfile.production @@ -0,0 +1 @@ +FROM git.nixc.us/nixius/focalboard:staging-db \ No newline at end of file diff --git a/docker/focalboard/Dockerfile b/docker/focalboard/Dockerfile new file mode 100644 index 0000000..12c7a79 --- /dev/null +++ b/docker/focalboard/Dockerfile @@ -0,0 +1 @@ +FROM mattermost/focalboard \ No newline at end of file diff --git a/docker/focalboard/Dockerfile.production b/docker/focalboard/Dockerfile.production new file mode 100644 index 0000000..b653fc3 --- /dev/null +++ b/docker/focalboard/Dockerfile.production @@ -0,0 +1 @@ +FROM git.nixc.us/nixius/focalboard:staging-focalboard \ No newline at end of file diff --git a/docker/loki/Dockerfile b/docker/loki/Dockerfile deleted file mode 100644 index 0b3f581..0000000 --- a/docker/loki/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM grafana/loki:latest \ No newline at end of file diff --git a/docker/loki/Dockerfile.production b/docker/loki/Dockerfile.production deleted file mode 100644 index 2245ab1..0000000 --- a/docker/loki/Dockerfile.production +++ /dev/null @@ -1 +0,0 @@ -FROM git.nixc.us/nixius/loki:staging-loki \ No newline at end of file diff --git a/docker/grafana/Dockerfile b/docker/nginx/Dockerfile similarity index 100% rename from docker/grafana/Dockerfile rename to docker/nginx/Dockerfile diff --git a/docker/grafana/Dockerfile.production b/docker/nginx/Dockerfile.production similarity index 100% rename from docker/grafana/Dockerfile.production rename to docker/nginx/Dockerfile.production diff --git a/docker/grafana/dashboards.yaml b/docker/nginx/dashboards.yaml similarity index 100% rename from docker/grafana/dashboards.yaml rename to docker/nginx/dashboards.yaml diff --git a/docker/grafana/dashboards/dashboard.json b/docker/nginx/dashboards/dashboard.json similarity index 100% rename from docker/grafana/dashboards/dashboard.json rename to docker/nginx/dashboards/dashboard.json diff --git a/docker/grafana/datasources.yaml b/docker/nginx/datasources.yaml similarity index 100% rename from docker/grafana/datasources.yaml rename to docker/nginx/datasources.yaml diff --git a/docker/grafana/grafana.ini b/docker/nginx/grafana.ini similarity index 100% rename from docker/grafana/grafana.ini rename to docker/nginx/grafana.ini diff --git a/stack.production.yml b/stack.production.yml index 9b418bd..1949e4c 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -1,35 +1,32 @@ version: "3.7" services: - loki: - image: git.nixc.us/nixius/loki:production-loki + focalboard: + image: git.nixc.us/nixius/focalboard:production-focalboard + environment: + - VIRTUAL_HOST=focalboard.nixc.us + - VIRTUAL_PORT=8000 volumes: - - /root/tank/persist/nixc.us/loki/production/data/:/loki/ + ## must be owned by "nobody" example: `sudo chown -R nobody /mnt/tank/persist/focalboard/production/data/` + - "/mnt/tank/persist/nixc.us/focalboard/production/data/:/data" + - "/mnt/tank/persist/nixc.us/focalboard/production/config/config.json:/opt/focalboard/config.json" deploy: replicas: 1 - labels: - homepage.group: apps - homepage.name: loki - homepage.href: https://loki.nixc.us/ - homepage.description: - us.nixc.autodeploy: "true" - traefik.enable: "true" - traefik.http.routers.production_loki_loki.tls: "true" - traefik.http.services.production_loki_loki.loadbalancer.server.port: 3100 - traefik.http.routers.production_loki_loki.rule: Host(`loki.nixc.us`) - traefik.http.routers.production_loki_loki.entrypoints: websecure - traefik.http.routers.production_loki_loki.tls.certresolver: letsencryptresolver - traefik.http.routers.production_loki_loki.service: production_loki_loki - traefik.docker.network: traefik -# - 'traefik.http.routers.production_uptime_uptime.middlewares=authelia@docker' placement: constraints: - - node.hostname == macmini3 + - node.hostname == macmini2 + labels: + - "traefik.enable=false" networks: + - default + nginx: + image: codeberg.org/iridium-net/lan-to-nginx:latest + environment: + - BACKEND_ADDRESS=focalboard_focalboard + - BACKEND_PORT=8000 + - PROTOCOL=http + networks: + - default - traefik - - logging - - grafana: - image: git.nixc.us/nixius/loki:production-grafana deploy: replicas: 1 labels: @@ -40,18 +37,32 @@ services: us.nixc.autodeploy: "true" traefik.enable: "true" traefik.http.routers.production_grafana_grafana.tls: "true" - traefik.http.services.production_grafana_grafana.loadbalancer.server.port: 3000 + traefik.http.services.production_grafana_grafana.loadbalancer.server.port: 80 traefik.http.routers.production_grafana_grafana.rule: Host(`grafana.nixc.us`) traefik.http.routers.production_grafana_grafana.entrypoints: websecure traefik.http.routers.production_grafana_grafana.tls.certresolver: letsencryptresolver traefik.http.routers.production_grafana_grafana.service: production_grafana_grafana traefik.docker.network: traefik # - 'traefik.http.routers.production_uptime_uptime.middlewares=authelia@docker' + focalboard-db: + image: git.nixc.us/nixius/focalboard:production-db + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == macmini2 + labels: + - "traefik.enable=false" + volumes: + - "/mnt/tank/persist/nixc.us/focalboard/production/db:/var/lib/postgresql/data" + environment: + POSTGRES_DB: boards + POSTGRES_USER: boardsuser + POSTGRES_PASSWORD: boardsuser-password networks: - - traefik - - logging + - default + networks: traefik: external: true - logging: - external: true \ No newline at end of file + default: diff --git a/stack.staging.yml b/stack.staging.yml index 28d430a..9ca46a3 100644 --- a/stack.staging.yml +++ b/stack.staging.yml @@ -1,30 +1,32 @@ version: "3.7" services: - loki: - image: git.nixc.us/nixius/loki:staging-loki + focalboard: + image: git.nixc.us/nixius/focalboard:production-focalboard + environment: + - VIRTUAL_HOST=focalboard.nixc.us + - VIRTUAL_PORT=8000 + # volumes: + # ## must be owned by "nobody" example: `sudo chown -R nobody /mnt/tank/persist/focalboard/production/data/` + # - "/mnt/tank/persist/nixc.us/focalboard/production/data/:/data" + # - "/mnt/tank/persist/nixc.us/focalboard/production/config/config.json:/opt/focalboard/config.json" deploy: replicas: 1 + placement: + constraints: + - node.hostname == macmini2 labels: - homepage.group: apps - homepage.name: loki - homepage.href: https://loki.nixc.us/ - homepage.description: - us.nixc.autodeploy: "true" - traefik.enable: "true" - traefik.http.routers.staging_loki_loki.tls: "true" - traefik.http.services.staging_loki_loki.loadbalancer.server.port: 3100 - traefik.http.routers.staging_loki_loki.rule: Host(`loki.nixc.us`) - traefik.http.routers.staging_loki_loki.entrypoints: websecure - traefik.http.routers.staging_loki_loki.tls.certresolver: letsencryptresolver - traefik.http.routers.staging_loki_loki.service: staging_loki_loki - traefik.docker.network: traefik -# - 'traefik.http.routers.staging_uptime_uptime.middlewares=authelia@docker' + - "traefik.enable=false" networks: + - default + nginx: + image: codeberg.org/iridium-net/lan-to-nginx:latest + environment: + - BACKEND_ADDRESS=focalboard_focalboard + - BACKEND_PORT=8000 + - PROTOCOL=http + networks: + - default - traefik - - - grafana: - image: git.nixc.us/nixius/loki:staging-grafana deploy: replicas: 1 labels: @@ -34,16 +36,33 @@ services: homepage.description: us.nixc.autodeploy: "true" traefik.enable: "true" - traefik.http.routers.staging_grafana_grafana.tls: "true" - traefik.http.services.staging_grafana_grafana.loadbalancer.server.port: 3000 - traefik.http.routers.staging_grafana_grafana.rule: Host(`grafana.nixc.us`) - traefik.http.routers.staging_grafana_grafana.entrypoints: websecure - traefik.http.routers.staging_grafana_grafana.tls.certresolver: letsencryptresolver - traefik.http.routers.staging_grafana_grafana.service: staging_grafana_grafana + traefik.http.routers.production_grafana_grafana.tls: "true" + traefik.http.services.production_grafana_grafana.loadbalancer.server.port: 80 + traefik.http.routers.production_grafana_grafana.rule: Host(`grafana.nixc.us`) + traefik.http.routers.production_grafana_grafana.entrypoints: websecure + traefik.http.routers.production_grafana_grafana.tls.certresolver: letsencryptresolver + traefik.http.routers.production_grafana_grafana.service: production_grafana_grafana traefik.docker.network: traefik -# - 'traefik.http.routers.staging_uptime_uptime.middlewares=authelia@docker' +# - 'traefik.http.routers.production_uptime_uptime.middlewares=authelia@docker' + focalboard-db: + image: git.nixc.us/nixius/focalboard:production-db + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == macmini2 + labels: + - "traefik.enable=false" + # volumes: + # - "/mnt/tank/persist/nixc.us/focalboard/production/db:/var/lib/postgresql/data" + environment: + POSTGRES_DB: boards + POSTGRES_USER: boardsuser + POSTGRES_PASSWORD: boardsuser-password networks: - - traefik + - default + networks: traefik: - external: true \ No newline at end of file + external: true + default: