From 84d0fe5f529b20d8d9efc881f1be70dc1d649ad0 Mon Sep 17 00:00:00 2001 From: alireza Date: Mon, 13 Jan 2025 22:21:23 +0330 Subject: [PATCH] feat: Add ip to caddyfile --- deployment/caddy/Caddyfile | 92 +++++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 30 deletions(-) diff --git a/deployment/caddy/Caddyfile b/deployment/caddy/Caddyfile index e533d8f..3a38e63 100644 --- a/deployment/caddy/Caddyfile +++ b/deployment/caddy/Caddyfile @@ -1,35 +1,67 @@ aaiss.ir { - @statics { - path /static/* /media/* - } - @backend { - path /admin* /api* - } - @frontend { - not path /static/* /admin* /api* /media* - } - - file_server @statics { - root / - } - - reverse_proxy @backend { - to backend:6446 - } - - handle @frontend { - # TODO: dockerize the frontend project to be able to build the dist directory automatically - root * /dist - try_files {path} /index.html - file_server - } - - log { - level error - output stdout - } + @statics { + path /static/* /media/* + } + @backend { + path /admin* /api* + } + @frontend { + not path /static/* /admin* /api* /media* + } + + file_server @statics { + root / + } + + reverse_proxy @backend { + to backend:6446 + } + + handle @frontend { + # TODO: dockerize the frontend project to be able to build the dist directory automatically + root * /dist + try_files {path} /index.html + file_server + } + + log { + level error + output stdout + } +} + +http://185.252.86.114 { + @statics { + path /static/* /media/* + } + @backend { + path /admin* /api* + } + @frontend { + not path /static/* /admin* /api* /media* + } + + file_server @statics { + root / + } + + reverse_proxy @backend { + to backend:6446 + } + + handle @frontend { + # TODO: dockerize the frontend project to be able to build the dist directory automatically + root * /dist + try_files {path} /index.html + file_server + } + + log { + level error + output stdout + } } www.aaiss.ir { - redir https://aaiss.ir{uri} + redir http://aaiss.ir{uri} }