Skip to content

Commit 420fb4a

Browse files
committed
added docker-compose
1 parent a687f5f commit 420fb4a

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

Dockerfile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
FROM node:16 AS builder
2+
ENV PORT=80
23
WORKDIR /usr/app
34
COPY . .
4-
RUN npm i -g pnpm
5-
RUN pnpm install && pnpm build
6-
7-
FROM node:16
8-
WORKDIR /usr/app
9-
COPY --from=builder /usr/app/package*.json ./
10-
COPY --from=builder /usr/app/dist ./dist
11-
COPY --from=builder /usr/app/public ./public
12-
RUN npx pnpm install
13-
ENV PORT=80
5+
RUN npm i -g pnpm && pnpm install && pnpm build
146
EXPOSE $PORT
157
ENTRYPOINT npm run start:prod
168

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: "3.3"
2+
services:
3+
web:
4+
build: .
5+
environment:
6+
PORT: 8080
7+
ports:
8+
- "4000:8080"
9+
ctfd:
10+
image: "ctfd/ctfd"
11+
ports:
12+
- "4001:8000"

test/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Test, TestingModule } from '@nestjs/testing';
22
import { INestApplication } from '@nestjs/common';
33
import * as request from 'supertest';
4-
import { AppModule } from './../src/app.module';
4+
import { AppModule } from '~/app.module';
55

66
describe('AppController (e2e)', () => {
77
let app: INestApplication;

0 commit comments

Comments
 (0)