From 5e5ba4050563f07bff367d2fb31ed7e7fca4291e Mon Sep 17 00:00:00 2001 From: sct Date: Sat, 19 Dec 2020 00:12:41 +0900 Subject: [PATCH] fix: change default internal port to 5055 (#389) --- Dockerfile | 2 +- README.md | 5 +++-- docker-compose.yml | 2 +- server/index.ts | 2 +- src/pages/_app.tsx | 4 ++-- src/pages/movie/[movieId]/index.tsx | 2 +- src/pages/tv/[tvId]/index.tsx | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35fb08b1f..1afedf3d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,4 @@ COPY --from=BUILD_IMAGE /app/node_modules ./node_modules CMD yarn start -EXPOSE 3000 +EXPOSE 5055 diff --git a/README.md b/README.md index ef1ca9d1a..fde92ef2c 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Currently, Overseerr is only distributed through Docker images. If you have Dock docker run -d \ -e LOG_LEVEL=info \ -e TZ=Asia/Tokyo \ - -p 5055:3000 \ + -p 5055:5055 \ -v /path/to/appdata/config:/app/config \ --restart unless-stopped \ sctx/overseerr @@ -76,7 +76,7 @@ After running Overseerr for the first time, configure it by visiting the web UI ## API Documentation -Full API documentation will soon be published automatically and available outside of running the app. Currently, you can access the API docs by running Overseerr locally and visiting http://localhost:3000/api-docs +Full API documentation will soon be published automatically and available outside of running the app. Currently, you can access the API docs by running Overseerr locally and visiting http://localhost:5055/api-docs ## Community @@ -124,4 +124,5 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d + diff --git a/docker-compose.yml b/docker-compose.yml index 111e55450..835bbf29c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: context: . dockerfile: Dockerfile.local ports: - - 3000:3000 + - 5055:5055 volumes: - .:/app:rw,cached - /app/node_modules diff --git a/server/index.ts b/server/index.ts index ef7cd56e0..87066254d 100644 --- a/server/index.ts +++ b/server/index.ts @@ -100,7 +100,7 @@ app } ); - const port = Number(process.env.PORT) || 3000; + const port = Number(process.env.PORT) || 5055; const host = process.env.HOST; if (host) { server.listen(port, host, () => { diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 53d15d7c4..733eff793 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -114,7 +114,7 @@ CoreApp.getInitialProps = async (initialProps) => { if (ctx.res) { // Check if app is initialized and redirect if necessary const response = await axios.get<{ initialized: boolean }>( - `http://localhost:${process.env.PORT || 3000}/api/v1/settings/public` + `http://localhost:${process.env.PORT || 5055}/api/v1/settings/public` ); const initialized = response.data.initialized; @@ -130,7 +130,7 @@ CoreApp.getInitialProps = async (initialProps) => { try { // Attempt to get the user by running a request to the local api const response = await axios.get( - `http://localhost:${process.env.PORT || 3000}/api/v1/auth/me`, + `http://localhost:${process.env.PORT || 5055}/api/v1/auth/me`, { headers: ctx.req ? { cookie: ctx.req.headers.cookie } : undefined } ); user = response.data; diff --git a/src/pages/movie/[movieId]/index.tsx b/src/pages/movie/[movieId]/index.tsx index a656ad7ed..fd27838fa 100644 --- a/src/pages/movie/[movieId]/index.tsx +++ b/src/pages/movie/[movieId]/index.tsx @@ -17,7 +17,7 @@ MoviePage.getInitialProps = async (ctx) => { if (ctx.req) { const cookies = parseCookies(ctx); const response = await axios.get( - `http://localhost:${process.env.PORT || 3000}/api/v1/movie/${ + `http://localhost:${process.env.PORT || 5055}/api/v1/movie/${ ctx.query.movieId }${cookies.locale ? `?language=${cookies.locale}` : ''}`, { diff --git a/src/pages/tv/[tvId]/index.tsx b/src/pages/tv/[tvId]/index.tsx index f5eb6e294..8fb6626f9 100644 --- a/src/pages/tv/[tvId]/index.tsx +++ b/src/pages/tv/[tvId]/index.tsx @@ -17,7 +17,7 @@ TvPage.getInitialProps = async (ctx) => { if (ctx.req) { const cookies = parseCookies(ctx); const response = await axios.get( - `http://localhost:${process.env.PORT || 3000}/api/v1/tv/${ + `http://localhost:${process.env.PORT || 5055}/api/v1/tv/${ ctx.query.tvId }${cookies.locale ? `?language=${cookies.locale}` : ''}`, {