psycho0verload/l0pb-traefik

By psycho0verload

Updated 12 months ago

L0pb simplifies local development with easy loopback connections to localhost.

Image
Networking
Developer tools
Web servers
0

961

psycho0verload/l0pb-traefik repository overview

L0pb - Loopback for Your Local Development!

Welcome to the L0pb project! L0pb offers a simple way to create a loopback connection to your localhost. This README explains the purpose and benefits of the project and refers to the corresponding website l0pb.me.

Why L0pb?

L0pb.me is a service that enables a loopback connection to localhost. All *.l0pb.dev and *.l0pb.me domains fundamentally point to 127.0.0.1, the localhost. This is similar to services like traefik.me or nip.io. This greatly simplifies local development, including the use of certificates.

Advantages of L0pb:
  • Easy Setup: No complex configuration required.
  • HTTPS Support: A wildcard certificate for *.l0pb.dev and *.l0pb.me is available thanks to Let’s Encrypt.
  • Flexible and Secure: Traefik as a reverse proxy for managing multiple projects simultaneously.

Local Development

L0pb is designed for simple local development. All you need is the l0pb-traefik image, a customized and preconfigured Traefik image.

Example Configuration

Here's an example of how you can use L0pb locally:

services:
  traefik:
    container_name: l0pb-traefik
    hostname: l0pb-traefik
    image: psycho0verload/l0pb-traefik
    labels:
      traefik.docker.network: proxy
      traefik.enable: "true"
      traefik.http.routers.traefik.entrypoints: websecure
      traefik.http.routers.traefik.rule: Host(`traefik.l0pb.me`) || Host(`traefik.l0pb.dev`)
      traefik.http.routers.traefik.service: api@internal
      traefik.http.routers.traefik.tls: "true"
      traefik.http.services.traefik.loadbalancer.sticky.cookie.httpOnly: "true"
      traefik.http.services.traefik.loadbalancer.sticky.cookie.secure: "true"
    networks:
      proxy:
        ipv4_address: 172.30.255.254
    ports:
      - mode: host
        target: 80
        published: "80"
        protocol: tcp
      - mode: host
        target: 443
        published: "443"
        protocol: tcp
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./log/traefik/:/var/log/traefik/
  mailhog:
    image: mailhog/mailhog
    hostname: l0pb-mailhog
    container_name: l0pb-mailhog
    restart: unless-stopped
    labels:
      traefik.docker.network: proxy
      traefik.enable: "true"
      traefik.http.routers.mailhog.entrypoints: websecure
      traefik.http.routers.mailhog.rule: Host(`mailhog.l0pb.me`) || Host(`mailhog.l0pb.dev`)
      traefik.http.routers.mailhog.tls: "true"
      traefik.http.routers.mailhog.service: mailhog
      traefik.http.services.mailhog.loadbalancer.server.port: "8025"
    networks:
      proxy:
networks:
  proxy:
    name: proxy
    driver: bridge
    ipam:
      config:
      - subnet: 172.30.0.0/16
    attachable: true

Save the docker-compose.yml file in a directory and start it with the command:

docker compose up -d

Check if the project is working by visiting https://traefik.l0pb.dev or https://traefik.l0pb.me.

More Information

Visit l0pb.me for more details and the full documentation.

Tag summary

Content type

Image

Digest

sha256:fd5a28983

Size

49.7 MB

Last updated

12 months ago

docker pull psycho0verload/l0pb-traefik:dd24cb8b0073a5e54db033f03f193b3b1f55cd67