mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Allow kyoo url to be configured on docker
This commit is contained in:
parent
d15c3ed047
commit
1cd418991c
@ -4,3 +4,4 @@ AUTHENTICATION_SECRET=
|
||||
POSTGRES_USER=kyoousername
|
||||
POSTGRES_PASSWORD=kyoopassword
|
||||
POSTGRES_DB=kyooDB
|
||||
PUBLIC_BACK_URL=http://localhost:5000
|
||||
|
@ -38,7 +38,7 @@ services:
|
||||
- "19000:19000"
|
||||
restart: on-failure
|
||||
environment:
|
||||
- KYOO_URL=http://back:5000
|
||||
- KYOO_URL=${KYOO_URL:-http://back:5000}
|
||||
- PUBLIC_BACK_URL=${PUBLIC_BACK_URL}
|
||||
ingress:
|
||||
image: nginx
|
||||
@ -46,7 +46,7 @@ services:
|
||||
environment:
|
||||
- PORT=8901
|
||||
- FRONT_URL=http://front:3000
|
||||
- BACK_URL=http://back:5000
|
||||
- BACK_URL=${KYOO_URL:-http://back:5000}
|
||||
volumes:
|
||||
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
||||
depends_on:
|
||||
|
@ -22,14 +22,15 @@ services:
|
||||
build: ./front
|
||||
restart: on-failure
|
||||
environment:
|
||||
- KYOO_URL=http://back:5000
|
||||
- KYOO_URL=${KYOO_URL:-http://back:5000}
|
||||
- PUBLIC_BACK_URL=${PUBLIC_BACK_URL}
|
||||
ingress:
|
||||
image: nginx
|
||||
restart: on-failure
|
||||
environment:
|
||||
- PORT=8901
|
||||
- FRONT_URL=http://front:8901
|
||||
- BACK_URL=http://back:5000
|
||||
- BACK_URL=${KYOO_URL:-http://back:5000}
|
||||
volumes:
|
||||
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
||||
depends_on:
|
||||
|
@ -102,7 +102,10 @@ const nextConfig = {
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
nextConfig.rewrites = async () => [
|
||||
{ source: "/api/:path*", destination: process.env.KYOO_URL ?? "http://localhost:5000/:path*" },
|
||||
{
|
||||
source: "/api/:path*",
|
||||
destination: `${process.env.KYOO_URL}/:path*` ?? "http://localhost:5000/:path*",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user