feat: display domain link if app is exposed
This commit is contained in:
parent
bbe774857a
commit
d196b8ff10
3 changed files with 11 additions and 21 deletions
|
@ -3,7 +3,7 @@ FROM alpine:3.16.0 as app
|
|||
WORKDIR /
|
||||
|
||||
# Install docker
|
||||
RUN apk --no-cache add docker-compose nodejs npm bash git
|
||||
RUN apk --no-cache add docker-compose nodejs npm bash g++ make git
|
||||
|
||||
RUN npm install node-gyp -g
|
||||
|
||||
|
|
|
@ -79,13 +79,6 @@ services:
|
|||
traefik.http.routers.api.entrypoints: web
|
||||
traefik.http.routers.api.middlewares: api-stripprefix
|
||||
traefik.http.services.api.loadbalancer.server.port: 3001
|
||||
# Websecure
|
||||
traefik.http.routers.api-secure.rule: (Host(`${DOMAIN}`) && PathPrefix(`/api`))
|
||||
traefik.http.routers.api-secure.entrypoints: websecure
|
||||
traefik.http.routers.api-secure.service: api-secure
|
||||
traefik.http.routers.api-secure.tls.certresolver: myresolver
|
||||
traefik.http.routers.api-secure.middlewares: api-stripprefix
|
||||
traefik.http.services.api-secure.loadbalancer.server.port: 3001
|
||||
# Middlewares
|
||||
traefik.http.middlewares.api-stripprefix.stripprefix.prefixes: /api
|
||||
|
||||
|
@ -114,24 +107,11 @@ services:
|
|||
traefik.http.routers.dashboard-redirect.service: dashboard
|
||||
traefik.http.services.dashboard-redirect.loadbalancer.server.port: 3000
|
||||
|
||||
traefik.http.routers.dashboard-redirect-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/`)
|
||||
traefik.http.routers.dashboard-redirect-secure.entrypoints: websecure
|
||||
traefik.http.routers.dashboard-redirect-secure.middlewares: redirect-middleware
|
||||
traefik.http.routers.dashboard-redirect-secure.service: dashboard
|
||||
traefik.http.routers.dashboard-redirect-secure.tls.certresolver: myresolver
|
||||
traefik.http.services.dashboard-redirect-secure.loadbalancer.server.port: 3000
|
||||
|
||||
# Web
|
||||
traefik.http.routers.dashboard.rule: PathPrefix("/dashboard")
|
||||
traefik.http.routers.dashboard.service: dashboard
|
||||
traefik.http.routers.dashboard.entrypoints: web
|
||||
traefik.http.services.dashboard.loadbalancer.server.port: 3000
|
||||
# Websecure
|
||||
traefik.http.routers.dashboard-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/dashboard`)
|
||||
traefik.http.routers.dashboard-secure.service: dashboard-secure
|
||||
traefik.http.routers.dashboard-secure.entrypoints: websecure
|
||||
traefik.http.routers.dashboard-secure.tls.certresolver: myresolver
|
||||
traefik.http.services.dashboard-secure.loadbalancer.server.port: 3000
|
||||
# Middlewares
|
||||
traefik.http.middlewares.redirect-middleware.redirectregex.regex: .*
|
||||
traefik.http.middlewares.redirect-middleware.redirectregex.replacement: /dashboard
|
||||
|
|
|
@ -152,6 +152,15 @@ const AppDetails: React.FC<IProps> = ({ app, info }) => {
|
|||
<div className="flex flex-col justify-between flex-1 ml-0 md:ml-4">
|
||||
<div className="mt-3 items-center self-center flex flex-col md:items-start md:self-start md:mt-0">
|
||||
<h1 className="font-bold text-2xl">{info.name}</h1>
|
||||
{app?.domain && app.exposed && (
|
||||
<a target="_blank" rel="noreferrer" className="text-blue-500 text-md" href={`https://${app.domain}`}>
|
||||
<Flex className="items-center">
|
||||
{app.domain}
|
||||
<FiExternalLink className="ml-1" />
|
||||
</Flex>
|
||||
</a>
|
||||
)}
|
||||
|
||||
<h2 className="text-center md:text-left">{info.short_desc}</h2>
|
||||
<h3 className="text-center md:text-left text-sm">
|
||||
version: <b>{version}</b>
|
||||
|
@ -166,6 +175,7 @@ const AppDetails: React.FC<IProps> = ({ app, info }) => {
|
|||
)}
|
||||
<p className="text-xs text-gray-600">By {info.author}</p>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-1">
|
||||
<AppActions
|
||||
updateAvailable={updateAvailable}
|
||||
|
|
Loading…
Add table
Reference in a new issue