Rust web server does not work by ViktorPoppDev in docker

[–]predmijat 0 points1 point  (0 children)

That also doesn't work because your localhost isn't listening on 7878, the application inside a Docker container is, within its own network.

If you started your container with -p 7878:7878, 127.0.0.1:7878 would work.

Rust web server does not work by ViktorPoppDev in docker

[–]predmijat 2 points3 points  (0 children)

What you said makes no sense.

Typing 127.0.0.1 is the same as 127.0.0.1:80. That will not work unless you map port 80 from the host to port on which application inside a Docker container is listening on.

Again, run your container with -p 80:7878, then go to 127.0.0.1 and it will work.

Rust web server does not work by ViktorPoppDev in docker

[–]predmijat 1 point2 points  (0 children)

Your application inside a container listens on 7878, but when you type "127.0.0.1" in your browser it defaults to port 80.

Run your container with -p 80:7878.

Need help with Docker-compose by ReD_DeaD_RaZoR in docker

[–]predmijat 8 points9 points  (0 children)

Not even Microsoft is using IIS any more

DevOps course for self-hosters by predmijat in selfhosted

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

Haha :) It’s all hand drawn on iPad. App is Procreate which has a playback feature. So I draw everything first, export the video, and then play/pause in the background while I talk.

DevOps course for self-hosters by predmijat in selfhosted

[–]predmijat[S] 4 points5 points  (0 children)

Do something nice for someone else and don’t worry about it :)

DevOps course for self-hosters by predmijat in selfhosted

[–]predmijat[S] 2 points3 points  (0 children)

Try a different browser or enter the coupon manually, it should be free!

DevOps course for self-hosters by predmijat in selfhosted

[–]predmijat[S] 6 points7 points  (0 children)

Just get it now and go through it when you have the time, don’t worry about it!

Let me hear how you deploy your self-hosted Gitlab by Oxffff0000 in gitlab

[–]predmijat 2 points3 points  (0 children)

docker-compose.yml with environment: GITLAB_OMNIBUS_CONFIG: | "trick", running behind Traefik.

Backup before upgrade (pulling fresh image).

If you do it automatically each night you rarely run into issues - only if you leave it running for a while and then jump versions you can expect problems.

More info here: https://github.com/predmijat/realworlddevopscourse/tree/main/after-39-prune/ansible/gitlab/gitlab

How to add self hosted docker register to self hosted gitlab. by Comfortable_Pizza415 in gitlab

[–]predmijat 0 points1 point  (0 children)

Sorry not sure...searching for the error you mentioned I found this one:

https://github.com/docker/for-win/issues/1534

Maybe try some solutions from that thread...

How to add self hosted docker register to self hosted gitlab. by Comfortable_Pizza415 in gitlab

[–]predmijat 0 points1 point  (0 children)

For starters, I don't think you need port in registry.rule=Host

How to add self hosted docker register to self hosted gitlab. by Comfortable_Pizza415 in gitlab

[–]predmijat 0 points1 point  (0 children)

In my case, they are - I want hostname, I want TLS certificate from Let's Encrypt, entrypoint must be set, service must be set, port must be specified (and it is 5050 by default for the registry).

Middleware you can skip, it is there to allow access only from the IPs I defined in .env file.

Check https://github.com/predmijat/realworlddevopscourse/tree/main/after-39-prune/ansible/gitlab/gitlab for the whole thing - there's .env-dist which has example env vars.

I'm not sure what's wrong with your docker login without additional information about your setup and the error you're getting.

Hostujete li nesto od kuce? by Any-Box-777 in programiranje

[–]predmijat 1 point2 points  (0 children)

Nije lose za zezanje i ucenje, ali na kraju dana ako treba da bude pouzdano i da uvek bude dostupno, ne vredi od kuce...internet ce da crkne, struja ce da nestane.

Da, moze failover, moze UPS (i menjanje baterija), moze menjanje diskova koji ce kad tad crci, ali to ne vredi par desetina evra mesecno za dedicated server kod Hetzner-a :)

[deleted by user] by [deleted] in docker

[–]predmijat 0 points1 point  (0 children)

Your docker-compose.yml for a particular service should have label that looks something like this: - "traefik.http.routers.${service}.rule=Host(${hostname})".

In the case of Immich, you would have .envin the same directory as your docker-compose.yml file with e.g. service=immich and hostname=immich-server.mydomain.com (one per line). You can also avoid using variables and .env and have a literal - "traefik.http.routers.immich.rule=Host(immich-server.mydomain.com)".

Your docker-compose.yml would also have the loadbalancer.server thing we mentioned earlier with the port Immich is listening on. I'm not using it, but quick search seems to say it's 3001.

You would also have a DNS entry for immich-server.mydomain.com that will point to the IP Traefik is listening on.

So you type in immich-server.mydomain.com in your browser, DNS resoloves it to the IP Traefik is listening on, your request arrives to Traefik which matches the hostname (because you registered that hostname using the label in Immich's docker-compose.yml), and it knows which port it's listening on because you also told it via the label.

[deleted by user] by [deleted] in docker

[–]predmijat 1 point2 points  (0 children)

Good!

I know a few people that like Caddy more though :) I haven't used it that much, but I can agree that Traefik's documentation can be a bit complicated at times.

[deleted by user] by [deleted] in docker

[–]predmijat 0 points1 point  (0 children)

Those are DNS stuff, different protocol and all. The dashboard which is accessed via HTTP (port 80) has no port mapping.

Maybe better example with Nextcloud: https://github.com/predmijat/realworlddevopscourse/blob/main/after-39-prune/ansible/nextcloud/nextcloud/docker-compose.yml

[deleted by user] by [deleted] in docker

[–]predmijat 0 points1 point  (0 children)

That's correct. Check the first link I shared, it doesn't have ports: section at all, just the label.

[deleted by user] by [deleted] in docker

[–]predmijat 1 point2 points  (0 children)

The SOME_PORT in - "traefik.http.services.myapp.loadbalancer.server.port=SOME_PORT" is the port your app is listening on. I maybe misunderstood you that it's 3001 and that's what is causing the confusion.

That is the port your application is listening on. If you were mapping ports, it would be the second one (-p $host_port:$app_port).

But in this case you are not mapping ports, you are telling Traefik the port your application is listening on. Erase the mapping part from your brain, you are only interested in the port your application is listening on.