Skip to content

Commit

Permalink
Merge pull request #64 from hwgilbert16/develop
Browse files Browse the repository at this point in the history
Hotfix: Fix issue with malformed HTTP responses
  • Loading branch information
hwgilbert16 authored Nov 10, 2023
2 parents 03ef9c0 + f8bd37b commit bf3eef6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ WORKDIR /usr/src/app

COPY package*.json .

RUN npm install --production --silent --legacy-peer-deps
RUN apk add g++ make py3-pip
RUN npm install --production --silent --unsafe-perm --legacy-peer-deps
RUN apk del g++ make py3-pip

COPY . .

Expand Down
3 changes: 1 addition & 2 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ async function bootstrap() {
fs.writeFileSync("./dist/api-spec.json", JSON.stringify(document));
SwaggerModule.setup("api", app, document);

const port = process.env.HTTP_PORT || 8080;
await app.init();

http.createServer(server).listen(port);
http.createServer(server).listen(process.env.HTTP_PORT);
}

bootstrap();
3 changes: 2 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ services:
image: hwgilbert16/scholarsome:latest
platform: "linux/amd64"
ports:
- "${HTTP_PORT}:8080"
- "${HTTP_PORT}:${HTTP_PORT}"
environment:
- "NODE_ENV=${NODE_ENV}"
- "DATABASE_URL=mysql://scholarsome:${DATABASE_PASSWORD}@mariadb:3306/scholarsome"
- "JWT_SECRET=${JWT_SECRET}"
- "HTTP_PORT=${HTTP_PORT}"
- "STORAGE_TYPE=${STORAGE_TYPE}"
- "REDIS_HOST=redis"
- "REDIS_PORT=6379"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf3eef6

Please sign in to comment.