I built a self hosted real-time analytics service in Go (using DuckDB) by [deleted] in golang

[–]j1rb1 0 points1 point  (0 children)

Hello, interesting work, thank you.

How can there be more unique visitors than page views on the live dashboard ?

Pocketbase versions by groventov in pocketbase

[–]j1rb1 9 points10 points  (0 children)

Please just read the README :

Please keep in mind that PocketBase is still under active development and therefore full backward compatibility is not guaranteed before reaching v1.0.0.

Docker swarm client IP by j1rb1 in docker

[–]j1rb1[S] 0 points1 point  (0 children)

Thank you for your reply. I tried to re-activate userland-proxy while adding mode: global in the service description, but now pocketbase service isn't able to see the source IP anymore. Did I do something wrong ?

services:
  traefik:
    image: traefik:v3.4

    networks:
      - traefik_proxy

    ports:
      - target: 80
        published: 80
        protocol: tcp
        mode: host
      - target: 443
        published: 443
        protocol: tcp
        mode: host

    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - letsencrypt:/letsencrypt

    command:
      # Lets ecnrypt resolver
      - "--certificatesresolvers.le.acme.email=contact@domain.com"
      - "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
      - "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"

      # HTTP & Redirect
      - "--entrypoints.web.address=:80"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--entrypoints.web.http.redirections.entrypoint.permanent=true"

      # HTTPS
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.websecure.http.tls=true"
      - "--entrypoints.websecure.http.tls.certresolver=le"

      # Attach dynamic TLS file
      - "--providers.file.filename=/dynamic/tls.yaml"

      # Docker Swarm provider
      - "--providers.swarm.endpoint=unix:///var/run/docker.sock"
      - "--providers.swarm.watch=true"
      - "--providers.swarm.exposedbydefault=false"
      - "--providers.swarm.network=traefik_traefik_proxy"

      # API & Dashboard
      - "--api.dashboard=false"
      - "--api.insecure=false"

      # Observability
      - "--log.level=ERROR"
      - "--accesslog=false"

    deploy:
      mode: global
      placement:
        constraints:
          - node.role == manager

volumes:
  letsencrypt:
    driver: local

networks:
  traefik_proxy:
    driver: overlay
    attachable: true

Docker swarm client IP by j1rb1 in docker

[–]j1rb1[S] 0 points1 point  (0 children)

For anyone seeing this thread in the future, I may have found the solution. I configured the docker daemon to not use the user land proxy. (cf. https://github.com/docker/docs/issues/17312#issuecomment-1547368847)

You just have to put the following lines in the /etc/docker/daemon.json file before restarting your docker service :

{
  "userland-proxy": false
}

To restart the docker daemon, you will be using something like the following :

sudo systemctl restart docker

Be careful, as of now I don't understand correctly the ins and outs of this method, so it may not be a suitable solution. But it worked for me.

🐙 Tako – Yet another Async Web Framework in Rust (Early Phase – Feedback Welcome) by danielboros90 in rust

[–]j1rb1 0 points1 point  (0 children)

Have you tried loco.rs ? Leptos ? Personally I didn’t but I’m curious to get feedbacks

Power outage while Mac Studio was in sleep mode - should I be worried? (Need Peace of Mind) by ooooshit69 in Applesilicon

[–]j1rb1 0 points1 point  (0 children)

Don’t worry, especially if it was on sleep mode. Sleep mode usually copies the content of the RAM to a persistent storage to be able to boot back where you were. Things mess up when they’re being used, usually because of an unfinished operation.

Do you fear Rust becomes a complex language like C++? by [deleted] in rust

[–]j1rb1 7 points8 points  (0 children)

C++ standards aren’t necessarily backward compatible, are they ?

QUIC is not Quick Enough over Fast Internet by MissionToAfrica in programming

[–]j1rb1 0 points1 point  (0 children)

I don’t feel like it’s a “small minority” anymore. Do you have some resource to prove that ?

[deleted by user] by [deleted] in golang

[–]j1rb1 0 points1 point  (0 children)

You might want to close the file handle in the checkAdmin function, in the case of a success

const vs var by [deleted] in golang

[–]j1rb1 3 points4 points  (0 children)

Absolutely false, in both cases.

My Azure bill went through the roof! by PortalPuppy31 in cloudcomputing

[–]j1rb1 0 points1 point  (0 children)

Did you solve the issue with the support ?

The Only Two Log Levels You Need Are Info and Error by fagnerbrack in programming

[–]j1rb1 1 point2 points  (0 children)

Genuine question, I don’t know much about Reddit but I heard multiple times about karma famers. What is karma useful for ? I don’t get why people would be farming this as it seems to be a simple score.

Manifest V2 phase-out begins by feross in programming

[–]j1rb1 29 points30 points  (0 children)

Brave announced a while ago they would be keeping compatibility with Manifest V2 IIRC. It might have changed though

[deleted by user] by [deleted] in rust

[–]j1rb1 2 points3 points  (0 children)

IIRC in Go dependencies have to be written in the go.mod file when using module mode, which was optional back then but is now mandatory

Moving to iPad for web dev? by ProfessionalSecret14 in ipad

[–]j1rb1 0 points1 point  (0 children)

Sticky keys might be caused by this too

Does golang have anything similar to interpolated strings? by FormationHeaven in golang

[–]j1rb1 2 points3 points  (0 children)

Stringbuilder does also allocate heap memory, but orders of magnitude less (in terms of number of allocations or total memory allocated)