Skip to content

Commit

Permalink
feat: Add ip to caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaYousefpourM committed Jan 13, 2025
1 parent 370c662 commit 84d0fe5
Showing 1 changed file with 62 additions and 30 deletions.
92 changes: 62 additions & 30 deletions deployment/caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -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}
}

0 comments on commit 84d0fe5

Please sign in to comment.