Add some debug

This commit is contained in:
Liam 2022-10-26 13:02:09 +01:00
parent 878fc145da
commit 0bd9ef5858
4 changed files with 11 additions and 16 deletions

@ -4,18 +4,6 @@ name: default
ports: [3001] ports: [3001]
steps: steps:
- name: install dependencies
image: node:18-alpine
commands:
- npm install
- name: test
image: node:18-alpine
commands:
- npm run lint
- name: build
image: node:18-alpine
commands:
- npm run build
- name: docker - name: docker
image: plugins/docker image: plugins/docker
settings: settings:

@ -15,7 +15,7 @@ RUN \
# Rebuild the source code only when needed # Rebuild the source code only when needed
FROM node:16-alpine AS builder FROM node:18-alpine AS builder
WORKDIR /app WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
@ -31,12 +31,12 @@ RUN yarn build
# RUN npm run build # RUN npm run build
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM node:16-alpine AS runner FROM node:18-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime. # Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs RUN adduser --system --uid 1001 nextjs

@ -185,6 +185,11 @@ export default class Overlay extends Component {
* @returns * @returns
*/ */
async updateData(id) { async updateData(id) {
console.log(
`Using url: ${
Utils.getWebsiteApi(this.state.websiteType).ApiUrl.PlayerData
}`
);
const data = await fetch( const data = await fetch(
Utils.getWebsiteApi(this.state.websiteType).ApiUrl.PlayerData.replace( Utils.getWebsiteApi(this.state.websiteType).ApiUrl.PlayerData.replace(
"%s", "%s",
@ -197,7 +202,9 @@ export default class Overlay extends Component {
} }
); );
try { try {
console.log(`status code: ${data.status}`);
const json = await data.json(); const json = await data.json();
console.log(json);
this.setState({ this.setState({
loadingPlayerData: false, loadingPlayerData: false,
id: id, id: id,

@ -2775,7 +2775,7 @@ semver@^7.3.5, semver@^7.3.7:
sharp@^0.31.1: sharp@^0.31.1:
version "0.31.1" version "0.31.1"
resolved "https://registry.npmjs.org/sharp/-/sharp-0.31.1.tgz" resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.31.1.tgz#b2f7076d381a120761aa93700cadefcf90a22458"
integrity sha512-GR8M1wBwOiFKLkm9JPun27OQnNRZdHfSf9VwcdZX6UrRmM1/XnOrLFTF0GAil+y/YK4E6qcM/ugxs80QirsHxg== integrity sha512-GR8M1wBwOiFKLkm9JPun27OQnNRZdHfSf9VwcdZX6UrRmM1/XnOrLFTF0GAil+y/YK4E6qcM/ugxs80QirsHxg==
dependencies: dependencies:
color "^4.2.3" color "^4.2.3"