mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -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_USER=kyoousername
|
||||||
POSTGRES_PASSWORD=kyoopassword
|
POSTGRES_PASSWORD=kyoopassword
|
||||||
POSTGRES_DB=kyooDB
|
POSTGRES_DB=kyooDB
|
||||||
|
PUBLIC_BACK_URL=http://localhost:5000
|
||||||
|
@ -38,7 +38,7 @@ services:
|
|||||||
- "19000:19000"
|
- "19000:19000"
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- KYOO_URL=http://back:5000
|
- KYOO_URL=${KYOO_URL:-http://back:5000}
|
||||||
- PUBLIC_BACK_URL=${PUBLIC_BACK_URL}
|
- PUBLIC_BACK_URL=${PUBLIC_BACK_URL}
|
||||||
ingress:
|
ingress:
|
||||||
image: nginx
|
image: nginx
|
||||||
@ -46,7 +46,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- PORT=8901
|
- PORT=8901
|
||||||
- FRONT_URL=http://front:3000
|
- FRONT_URL=http://front:3000
|
||||||
- BACK_URL=http://back:5000
|
- BACK_URL=${KYOO_URL:-http://back:5000}
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -22,14 +22,15 @@ services:
|
|||||||
build: ./front
|
build: ./front
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- KYOO_URL=http://back:5000
|
- KYOO_URL=${KYOO_URL:-http://back:5000}
|
||||||
|
- PUBLIC_BACK_URL=${PUBLIC_BACK_URL}
|
||||||
ingress:
|
ingress:
|
||||||
image: nginx
|
image: nginx
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- PORT=8901
|
- PORT=8901
|
||||||
- FRONT_URL=http://front:8901
|
- FRONT_URL=http://front:8901
|
||||||
- BACK_URL=http://back:5000
|
- BACK_URL=${KYOO_URL:-http://back:5000}
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -102,7 +102,10 @@ const nextConfig = {
|
|||||||
|
|
||||||
if (process.env.NODE_ENV !== "production") {
|
if (process.env.NODE_ENV !== "production") {
|
||||||
nextConfig.rewrites = async () => [
|
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