diff --git a/.github/workflows/build_growi_hackmd.yaml b/.github/workflows/build_growi_hackmd.yaml deleted file mode 100644 index 31ba18766..000000000 --- a/.github/workflows/build_growi_hackmd.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: CI -on: - push: - paths: - - ".github/workflows/build_growi_hackmd.yaml" - - "docker-images/growi/hackmd/**" - -env: - IMAGE: ghcr.io/giganticminecraft/growi-hackmd - -jobs: - build-image: - name: Build docker image (and publish on master) - runs-on: ubuntu-22.04 - defaults: - run: - working-directory: docker-images/mod-downloader - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE }} - tags: | - type=sha,prefix=sha-,suffix=,format=short - type=schedule,pattern={{date 'YYYYMMDD'}} - - - name: Build (and push if on main) - id: docker_build - uses: docker/build-push-action@v5 - with: - context: ./docker-images/growi/hackmd - builder: ${{ steps.buildx.outputs.name }} - push: ${{ github.ref == 'refs/heads/main' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - # すべてのビルドステージのすべてのレイヤーをキャッシュして欲しいのでmode=max - cache-to: type=gha,mode=max diff --git a/docker-images/growi/hackmd/Dockerfile b/docker-images/growi/hackmd/Dockerfile deleted file mode 100644 index 36f1adde6..000000000 --- a/docker-images/growi/hackmd/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# syntax=docker/dockerfile:1.7 -FROM hackmdio/hackmd:1.3.0-alpine -LABEL org.opencontainers.image.authors="outductor " -LABEL org.opencontainers.image.url="https://github.com/GiganticMinecraft/seichi_infra" -LABEL org.opencontainers.image.source="https://github.com/GiganticMinecraft/seichi_infra/blob/main/docker-images/growi/hackmd/Dockerfile" - -# copy script to apply GROWI agent -COPY apply-growi-agent.sh /codimd/apply-growi-agent.sh -# run the script -RUN /codimd/apply-growi-agent.sh - -# overwrite HackMD config file -RUN rm -f /files/config.json && rm -f /codimd/config.json -COPY config.json /files/ -RUN ln -s /files/config.json /codimd/config.json - -# create sqlite data dir -RUN mkdir /files/sqlite && chown codimd /files/sqlite -RUN ln -s /files/sqlite /codimd/sqlite diff --git a/docker-images/growi/hackmd/apply-growi-agent.sh b/docker-images/growi/hackmd/apply-growi-agent.sh deleted file mode 100755 index 7d4903940..000000000 --- a/docker-images/growi/hackmd/apply-growi-agent.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo '' >> /codimd/public/views/codimd/head.ejs -echo '' >> /codimd/public/views/codimd/foot.ejs diff --git a/docker-images/growi/hackmd/config.json b/docker-images/growi/hackmd/config.json deleted file mode 100644 index 502059277..000000000 --- a/docker-images/growi/hackmd/config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "production": { - "urlAddPort": true, - "email": true, - "imageUploadType": "imgur", - "sessionName": "connect.codimd.sid" - } -} diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/cloudflared-tunnel-exits/http-exits.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/cloudflared-tunnel-exits/http-exits.yaml index bde5bdc17..4b518b7ae 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/cloudflared-tunnel-exits/http-exits.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/cloudflared-tunnel-exits/http-exits.yaml @@ -100,11 +100,6 @@ spec: external-hostname: wiki.onp-k8s.admin.seichi.click internal-authority: "growi.growi-system:3000" - # HackMD for Growi - - name: hackmd - external-hostname: hackmd.onp-k8s.admin.seichi.click - internal-authority: "hackmd.growi-system:3000" - template: metadata: name: "cloudflared-tunnel-http-exit--{{name}}" diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/growi/deployment.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/growi/deployment.yaml index f94472d64..541fb5b39 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/growi/deployment.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/growi/deployment.yaml @@ -14,13 +14,13 @@ spec: spec: containers: - name: growi - image: weseek/growi:6 + image: weseek/growi:7 resources: requests: - cpu: 1 + cpu: "1" memory: 1Gi limits: - cpu: 1 + cpu: "1" memory: 1Gi env: - name: APP_SITE_URL @@ -35,10 +35,6 @@ spec: value: "mongodb" - name: MATHJAX value: "1" - - name: HACKMD_URI - value: "https://hackmd.onp-k8s.admin.seichi.click" - - name: HACKMD_URI_FOR_SERVER - value: "http://hackmd:3000" - name: PASSWORD_SEED valueFrom: secretKeyRef: diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/deployment.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/deployment.yaml deleted file mode 100644 index 8a7745325..000000000 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: hackmd - namespace: growi-system -spec: - selector: - matchLabels: - app: hackmd - replicas: 1 - template: - metadata: - labels: - app: hackmd - spec: - containers: - - name: hackmd - image: ghcr.io/giganticminecraft/growi-hackmd:sha-a6d1213 - resources: - requests: - cpu: 1 - memory: 1Gi - limits: - cpu: 1 - memory: 1Gi - env: - - name: CMD_CSP_ENABLE - value: "false" - - name: GROWI_URI - value: "https://wiki.onp-k8s.admin.seichi.click" - - name: CMD_DB_URL - valueFrom: - secretKeyRef: - name: hackmd-mariadb - key: db-url - # - name: CMD_DOMAIN - # value: "https://hackmd.onp-k8s.admin.seichi.click" - - name: CMD_ALLOW_ORIGIN - value: "hackmd.onp-k8s.admin.seichi.click, hackmd" - - name: CMD_URL_ADDPORT - value: "false" - - name: CMD_USECDN - value: "true" - ports: - - name: http - containerPort: 3000 - livenessProbe: - httpGet: - path: /status - port: http - initialDelaySeconds: 30 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /status - port: http - initialDelaySeconds: 5 - periodSeconds: 5 diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/mariadb.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/mariadb.yaml deleted file mode 100644 index 1522d3650..000000000 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/mariadb.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: mariadb.mmontes.io/v1alpha1 -kind: MariaDB -metadata: - namespace: growi-system - name: hackmd-mariadb -spec: - rootPasswordSecretKeyRef: - name: hackmd-mariadb - key: root-password - - database: hackmd - username: hackmd - passwordSecretKeyRef: - name: hackmd-mariadb - key: hackmd-password - - image: mariadb:10.11.7 - imagePullPolicy: IfNotPresent - - port: 3306 - - volumeClaimTemplate: - resources: - requests: - storage: 10Gi - storageClassName: synology-iscsi-storage - accessModes: - - ReadWriteOnce - - # myCnf: | - # [mariadb] - # innodb_buffer_pool_size = 1G - # innodb_log_file_size = 256M - # innodb_flush_log_at_trx_commit = 2 - # innodb_write_io_threads = 8 - # innodb_io_capacity = 1000 - # max_allowed_packet = 256M - - livenessProbe: - exec: - command: - - bash - - -c - - mysql -u root -p"${MARIADB_ROOT_PASSWORD}" -e "SELECT 1;" - initialDelaySeconds: 20 - periodSeconds: 10 - timeoutSeconds: 5 - - readinessProbe: - exec: - command: - - bash - - -c - - mysql -u root -p"${MARIADB_ROOT_PASSWORD}" -e "SELECT 1;" - initialDelaySeconds: 20 - periodSeconds: 10 - timeoutSeconds: 5 - - metrics: - enabled: true - exporter: - image: prom/mysqld-exporter:v0.15.1 - resources: - requests: - cpu: 50m - memory: 64Mi - limits: - cpu: 300m - memory: 512Mi - serviceMonitor: - prometheusRelease: prometheus - interval: 10s - scrapeTimeout: 10s diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/service.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/service.yaml deleted file mode 100644 index 3ea2efe5c..000000000 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/hackmd/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: hackmd - namespace: growi-system -spec: - type: ClusterIP - ports: - - name: http - port: 3000 - targetPort: 3000 - protocol: TCP - selector: - app: hackmd