Skip to content

Commit

Permalink
Merge pull request #17 from ToxicToast/hotfix/dockerimages
Browse files Browse the repository at this point in the history
Hotfix/dockerimages
  • Loading branch information
ToxicToast authored May 18, 2024
2 parents 045d01d + 67a614b commit 247772d
Show file tree
Hide file tree
Showing 20 changed files with 113 additions and 392 deletions.
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.nx
.vscode
.vscode/*
apps
apps/*
libs
libs/*
node_modules
node_modules/*
.github
.gitignore/*
tools
.dockerignore
.editorconfig
.eslintignore
.eslintrc.json
.gitignore
.lintstagedrc
.prettierignore
.prettierrc
jest.config.ts
jest.preset.js
nx.json
README.md
tsconfig.base.json
25 changes: 14 additions & 11 deletions apps/apialerts-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM docker.io/node:lts-alpine

ENV HOST=0.0.0.0
ENV PORT=3000

# Stufe 1: Build-Image
FROM docker.io/node:22-alpine as build
WORKDIR /app
COPY dist/apps/apialerts-service .
COPY package*.json ./
RUN npm install --omit=dev

RUN addgroup --system apialerts-service && \
adduser --system -G apialerts-service apialerts-service
# Stufe 2: Produktions-Image

COPY dist/apps/apialerts-service .
RUN chown -R apialerts-service:apialerts-service .
ENV APP_VERSION = local

FROM docker.io/node:22-alpine
WORKDIR /app
COPY --from=build /app /app

RUN npm i --omit=dev --omit=optional
RUN npm i --save @toxictoast/azkaban-base-types
# Expose Port
EXPOSE 3000

# Entry Point
CMD [ "node", "main.js" ]
27 changes: 15 additions & 12 deletions apps/azkaban-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM docker.io/node:lts-alpine

ENV HOST=0.0.0.0
ENV PORT=3000

# Stufe 1: Build-Image
FROM docker.io/node:22-alpine as build
WORKDIR /app
COPY dist/apps/azkaban-gateway .
COPY package*.json ./
RUN npm install --omit=dev

RUN addgroup --system azkaban-gateway && \
adduser --system -G azkaban-gateway azkaban-gateway
# Stufe 2: Produktions-Image

COPY dist/apps/azkaban-gateway .
RUN chown -R azkaban-gateway:azkaban-gateway .
ENV APP_VERSION = local

FROM docker.io/node:22-alpine
WORKDIR /app
COPY --from=build /app /app

RUN npm i --omit=dev --omit=optional
RUN npm i --save @toxictoast/azkaban-base-types
# Expose Port
EXPOSE 3000

CMD [ "node", "main.js" ]
# Entry Point
CMD [ "node", "main.js" ]
1 change: 0 additions & 1 deletion apps/azkaban-gateway/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"command": "docker build -f apps/azkaban-gateway/Dockerfile . -t azkaban2015/gateway:{args.VERSION}"
},
"docker-push": {
"dependsOn": ["docker-build"],
"command": "docker push azkaban2015/gateway:{args.VERSION}"
}
}
Expand Down
18 changes: 0 additions & 18 deletions apps/azkaban-gateway/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Module } from '@nestjs/common';
import { AuthModule } from './auth/auth.module';
import { HealthModule } from './health/health.module';
import { MetricsModule } from './metrics/metrics.module';
import { UsersModule } from './users/users.module';
import { RouterModule } from '@nestjs/core';
import { ThrottlerModule } from '@nestjs/throttler';
import { GroupsModule } from './groups/groups.module';
import { VersionModule } from './version/version.module';

@Module({
Expand All @@ -20,9 +17,6 @@ import { VersionModule } from './version/version.module';
//
HealthModule,
MetricsModule,
AuthModule,
UsersModule,
GroupsModule,
VersionModule,
//
RouterModule.register([
Expand All @@ -34,18 +28,6 @@ import { VersionModule } from './version/version.module';
path: 'metrics',
module: MetricsModule,
},
{
path: 'auth',
module: AuthModule,
},
{
path: 'users',
module: UsersModule,
},
{
path: 'groups',
module: GroupsModule,
},
{
path: 'version',
module: VersionModule,
Expand Down
40 changes: 0 additions & 40 deletions apps/azkaban-gateway/src/app/auth/auth.controller.ts

This file was deleted.

11 changes: 0 additions & 11 deletions apps/azkaban-gateway/src/app/auth/auth.module.ts

This file was deleted.

52 changes: 0 additions & 52 deletions apps/azkaban-gateway/src/app/auth/auth.service.ts

This file was deleted.

62 changes: 0 additions & 62 deletions apps/azkaban-gateway/src/app/groups/groups.controller.ts

This file was deleted.

11 changes: 0 additions & 11 deletions apps/azkaban-gateway/src/app/groups/groups.module.ts

This file was deleted.

73 changes: 0 additions & 73 deletions apps/azkaban-gateway/src/app/groups/groups.service.ts

This file was deleted.

Loading

0 comments on commit 247772d

Please sign in to comment.