Comment on Should I move to Docker?
felbane@lemmy.world 10 months agoYou don’t actually have to care about defining IP, cpu/ram reservations, etc. Your docker-compose file just defines the applications you want and a port mapping or two, and that’s it.
Example:
--- version: "2.1" services: adguardhome-sync: image: lscr.io/linuxserver/adguardhome-sync:latest container_name: adguardhome-sync environment: - CONFIGFILE=/config/adguardhome-sync.yaml volumes: - /my/appdata/config:/config ports: - 8080:8080 restart: - unless-stopped
That’s it, you run docker-compose up
and the container starts, reads your config from your config folder, and exposes port 8080 to the rest of your network.
Dyskolos@lemmy.zip 10 months ago
Oh… But that means I need another server with a reverse-proxy to actually reach it by domain/ip? Luckily caddy already runs fine 😊
Thanks man!
felbane@lemmy.world 10 months ago
Most people set up a reverse proxy, yes, but it’s not strictly necessary. You could certainly change the port mapping to
8080:443
and expose the application port directly that way, but then you’d obviously have to jump through some extra hoops for certificates, etc.Caddy is a great solution (and there’s even a container image for it 😉)
Dyskolos@lemmy.zip 10 months ago
Lol…nah i somehow prefer at least caddy non-containerized. Many domains and ports, i think that would not work great in a container with the certificates (which i also need to manually copy regularly to some apps). But what do i know 😁