Closed ModischFabrications closed 5 months ago
Might want to allow both routes or build a simple forwarding/rerouting. Even if there are other services running I can always bundle them at one traefik instance.
@Bouni I saw that you actually did a cutsolver.* URL, can you share what/how you set it up?
Sure, I use caddy as my webserver/reverse proxy which is so much easier to use than traefik in my opinion.
The Caddyfile
{
admin off
log {
format console
}
}
cutsolverapi.bouni.de {
reverse_proxy /solve cutsolver
reverse_proxy /debug cutsolver
reverse_proxy /constants cutsolver
reverse_proxy /version cutsolver
reverse_proxy cutsolver_frontend
}
The docker-compose.yaml
version: "3"
services:
caddy:
container_name: caddy
image: caddy
volumes:
- /opt/docker/webserver/caddy/Caddyfile:/etc/caddy/Caddyfile
- /opt/docker/webserver/caddy/data:/data
- /opt/docker/webserver/caddy/config:/config
restart: unless-stopped
ports:
- 80:80
- 443:443
networks:
- webserver
cutsolver:
container_name: cutsolver
image: modischfabrications/cutsolver:latest
restart: unless-stopped
networks:
- webserver
- cutsolver
cutsolver_frontend:
container_name: cutsolver_frontend
image: modischfabrications/cutsolver_frontend:latest
restart: unless-stopped
environment:
- VUE_APP_BACKEND_SOLVER_URL=https://cutsolver.bouni.de/solve
networks:
- webserver
- cutsolver
depends_on:
- cutsolver
networks:
webserver:
name: webserver
driver: bridge
cutsolver:
name: cutsolver
Caddy automatically gets a letsencrypt SSL cert for you, and works just perfectly for me. 10/10 ⭐
Wow, thanks a lot for that recommendation! Took me a bit to get it to work with .env files but now everything is cleaner and easier than ever 🥳
cutsolver.modisch.me would be cleaner. This should be manageable with namecheap DNS + traefik, but I need to watch out for reroutes and parallel services on the same instance