HTTP_404_NotFound@lemmyonline.com to Chat@beehaw.orgEnglish · 1 year agoTest Postmessage-squaremessage-square4fedilinkarrow-up12arrow-down10file-text
arrow-up12arrow-down1message-squareTest PostHTTP_404_NotFound@lemmyonline.com to Chat@beehaw.orgEnglish · 1 year agomessage-square4fedilinkfile-text
minus-squareHTTP_404_NotFound@lemmyonline.comOPlinkfedilinkEnglisharrow-up0·edit-21 year agoNOT only did I do it in kubernetes, But- I built all of the manifests by hand. AND- I am not using that crappy nginx proxy. I created the manifests to use my default traefik proxy’s ingressroute. Edit- and thanks for the reply!
minus-squarers5th@lemmy.scottlabs.iolinkfedilinkEnglisharrow-up0·1 year agoHere’s a cronjob to clean up the useless activity table every day: apiVersion: batch/v1beta1 kind: CronJob metadata: name: postgresql-cleanup namespace: lemmy spec: schedule: "0 0 * * *" jobTemplate: spec: template: spec: containers: - name: postgres-cleanup image: postgres:alpine command: ["psql", "--host=postgresql", "--dbname=postgres", "--username=postgres", "--command=DELETE FROM activity WHERE published < NOW() - INTERVAL '1 day';"] env: - name: PGPASSWORD valueFrom: secretKeyRef: name: postgresql key: postgres-password backoffLimit: 0 ttlSecondsAfterFinished: 3600
minus-squareHTTP_404_NotFound@lemmyonline.comOPlinkfedilinkEnglisharrow-up1·edit-21 year agoOh sweet, here, I will share my lovely ingressroute in return… to replace the nginx stuff everyone else is using. apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: lemmy namespace: lemmy spec: entryPoints: - websecure routes: - kind: Rule match: Host(`lemmyonline.com`) && (Headers(`Accept`, `application/activity+json`) || Headers(`Accept`, `application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"`)) services: - name: lemmy port: http - kind: Rule match: Host(`lemmyonline.com`) && (PathPrefix(`/api`) || PathPrefix(`/pictrs`) || PathPrefix(`/feeds`) || PathPrefix(`/nodeinfo`) || PathPrefix(`/.well-known`)) services: - name: lemmy port: http - kind: Rule match: Host(`lemmyonline.com`) && Method(`POST`) services: - name: lemmy port: http - kind: Rule match: Host(`lemmyonline.com`) services: - name: lemmy-ui port: http Thanks! Edit- could be consolidated down to only two rules, I left it expanded out to be a tad easier to read.
NOT only did I do it in kubernetes, But- I built all of the manifests by hand.
AND- I am not using that crappy nginx proxy. I created the manifests to use my default traefik proxy’s ingressroute.
Edit- and thanks for the reply!
Here’s a cronjob to clean up the useless activity table every day:
apiVersion: batch/v1beta1 kind: CronJob metadata: name: postgresql-cleanup namespace: lemmy spec: schedule: "0 0 * * *" jobTemplate: spec: template: spec: containers: - name: postgres-cleanup image: postgres:alpine command: ["psql", "--host=postgresql", "--dbname=postgres", "--username=postgres", "--command=DELETE FROM activity WHERE published < NOW() - INTERVAL '1 day';"] env: - name: PGPASSWORD valueFrom: secretKeyRef: name: postgresql key: postgres-password backoffLimit: 0 ttlSecondsAfterFinished: 3600
Oh sweet, here, I will share my lovely ingressroute in return… to replace the nginx stuff everyone else is using.
apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: lemmy namespace: lemmy spec: entryPoints: - websecure routes: - kind: Rule match: Host(`lemmyonline.com`) && (Headers(`Accept`, `application/activity+json`) || Headers(`Accept`, `application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"`)) services: - name: lemmy port: http - kind: Rule match: Host(`lemmyonline.com`) && (PathPrefix(`/api`) || PathPrefix(`/pictrs`) || PathPrefix(`/feeds`) || PathPrefix(`/nodeinfo`) || PathPrefix(`/.well-known`)) services: - name: lemmy port: http - kind: Rule match: Host(`lemmyonline.com`) && Method(`POST`) services: - name: lemmy port: http - kind: Rule match: Host(`lemmyonline.com`) services: - name: lemmy-ui port: http
Thanks!
Edit- could be consolidated down to only two rules, I left it expanded out to be a tad easier to read.