diff --git a/hosts/koi/containers/sharkey/Dockerfile b/hosts/koi/containers/sharkey/Dockerfile index fa5381e..56682ed 100644 --- a/hosts/koi/containers/sharkey/Dockerfile +++ b/hosts/koi/containers/sharkey/Dockerfile @@ -3,4 +3,5 @@ FROM git.joinsharkey.org/sharkey/sharkey:latest COPY patches /patches RUN apk add patch && \ - patch -p0 < /patches/fake-deepl-server.patch \ No newline at end of file + patch -p0 < /patches/fake-deepl-server.patch && \ + patch -p0 < /patches/zond.patch \ No newline at end of file diff --git a/hosts/koi/containers/sharkey/default.nix b/hosts/koi/containers/sharkey/default.nix index 8f1c91a..11954fe 100644 --- a/hosts/koi/containers/sharkey/default.nix +++ b/hosts/koi/containers/sharkey/default.nix @@ -9,6 +9,7 @@ systemd.tmpfiles.rules = [ "d /mnt/puffer/Sharkey 0777 root root -" + "d /srv/Sharkey 0777 root root -" ]; services.nginx.virtualHosts."very.stupid.fish" = { diff --git a/hosts/koi/containers/sharkey/docker-compose.yaml b/hosts/koi/containers/sharkey/docker-compose.yaml index 47954fa..b8f4eab 100644 --- a/hosts/koi/containers/sharkey/docker-compose.yaml +++ b/hosts/koi/containers/sharkey/docker-compose.yaml @@ -6,9 +6,12 @@ services: context: . restart: unless-stopped depends_on: - - db - - redis - - meilisearch + db: + condition: service_healthy + redis: + condition: service_healthy + meilisearch: + condition: service_started networks: - calcnet environment: @@ -23,7 +26,11 @@ services: networks: - calcnet volumes: - - /mnt/puffer/Sharkey/redis:/data + - /srv/Sharkey/redis:/data + healthcheck: + test: "redis-cli ping" + interval: 5s + retries: 20 db: restart: unless-stopped @@ -35,7 +42,11 @@ services: POSTGRES_USER: misskey POSTGRES_DB: misskey volumes: - - /mnt/puffer/Sharkey/db:/var/lib/postgresql/data + - /srv/Sharkey/db:/var/lib/postgresql/data + healthcheck: + test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" + interval: 5s + retries: 20 meilisearch: restart: always diff --git a/hosts/koi/containers/sharkey/patches/fake-deepl-server.patch b/hosts/koi/containers/sharkey/patches/fake-deepl-server.patch index 641a5fb..c106481 100644 --- a/hosts/koi/containers/sharkey/patches/fake-deepl-server.patch +++ b/hosts/koi/containers/sharkey/patches/fake-deepl-server.patch @@ -1,5 +1,5 @@ --- packages/backend/built/server/api/endpoints/notes/translate.js -+++ packages/backend/built/server/api/endpoints/notes/translate.js.orig ++++ packages/backend/built/server/api/endpoints/notes/translate.js @@ -99,7 +99,7 @@ params.append('auth_key', instance.deeplAuthKey); params.append('text', note.text); diff --git a/hosts/koi/containers/sharkey/patches/zond.patch b/hosts/koi/containers/sharkey/patches/zond.patch new file mode 100644 index 0000000..a95e630 --- /dev/null +++ b/hosts/koi/containers/sharkey/patches/zond.patch @@ -0,0 +1,10 @@ +--- packages/backend/built/server/web/views/base.pug ++++ packages/backend/built/server/web/views/base.pug +@@ -44,6 +44,7 @@ + link(rel='stylesheet' href='/static-assets/fonts/sharkey-icons/style.css') + link(rel='modulepreload' href=`/vite/${clientEntry.file}`) + script(src='/client-assets/libopenmpt.js') ++ script(src='https://zond.tei.su/script.js' data-website-id="9629ae3b-b086-4be1-acd2-82e2a4a58c2a") + + if !config.clientManifestExists + script(type="module" src="/vite/@vite/client")