Fixing backend image
All checks were successful
Anatid Blog CI Workflow / test (./backend) (push) Successful in 30s
Anatid Blog CI Workflow / test (./frontend) (push) Successful in 32s
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Successful in 51s
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Successful in 45s
Anatid Blog CI Workflow / deploy (push) Successful in 13s
All checks were successful
Anatid Blog CI Workflow / test (./backend) (push) Successful in 30s
Anatid Blog CI Workflow / test (./frontend) (push) Successful in 32s
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Successful in 51s
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Successful in 45s
Anatid Blog CI Workflow / deploy (push) Successful in 13s
This commit is contained in:
parent
12761802cf
commit
cdaa6a1416
@ -1,14 +1,8 @@
|
||||
# Build Stage
|
||||
FROM node:23-alpine AS build
|
||||
FROM node:23-alpine
|
||||
WORKDIR /app
|
||||
COPY ./package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
# COPY .env .env.development ./
|
||||
RUN npm run build
|
||||
|
||||
# Production Stage
|
||||
FROM nginx:stable-alpine AS production
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD [ "node", "dist/main.js" ]
|
||||
|
522
backend/package-lock.json
generated
522
backend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -23,8 +23,11 @@
|
||||
"@nestjs/common": "^11.0.1",
|
||||
"@nestjs/core": "^11.0.1",
|
||||
"@nestjs/platform-express": "^11.0.1",
|
||||
"@nestjs/typeorm": "^11.0.0",
|
||||
"pg": "^8.14.1",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.1"
|
||||
"rxjs": "^7.8.1",
|
||||
"typeorm": "^0.3.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { PostsModule } from './posts/posts.module';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
imports: [PostsModule],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
|
@ -3,6 +3,7 @@ import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
app.enableCors();
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
bootstrap();
|
||||
|
7
backend/src/posts/post.entity.ts
Normal file
7
backend/src/posts/post.entity.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export class Post {
|
||||
id: number;
|
||||
title: string;
|
||||
uri: string;
|
||||
body: string;
|
||||
created: Date;
|
||||
}
|
18
backend/src/posts/posts.controller.spec.ts
Normal file
18
backend/src/posts/posts.controller.spec.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { PostsController } from './posts.controller';
|
||||
|
||||
describe('PostsController', () => {
|
||||
let controller: PostsController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [PostsController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<PostsController>(PostsController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
4
backend/src/posts/posts.controller.ts
Normal file
4
backend/src/posts/posts.controller.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('posts')
|
||||
export class PostsController {}
|
9
backend/src/posts/posts.module.ts
Normal file
9
backend/src/posts/posts.module.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { PostsController } from './posts.controller';
|
||||
import { PostsService } from './posts.service';
|
||||
|
||||
@Module({
|
||||
controllers: [PostsController],
|
||||
providers: [PostsService]
|
||||
})
|
||||
export class PostsModule {}
|
18
backend/src/posts/posts.service.spec.ts
Normal file
18
backend/src/posts/posts.service.spec.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { PostsService } from './posts.service';
|
||||
|
||||
describe('PostsService', () => {
|
||||
let service: PostsService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [PostsService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<PostsService>(PostsService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
4
backend/src/posts/posts.service.ts
Normal file
4
backend/src/posts/posts.service.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class PostsService {}
|
Loading…
x
Reference in New Issue
Block a user