File tree Expand file tree Collapse file tree 5 files changed +106
-6
lines changed Expand file tree Collapse file tree 5 files changed +106
-6
lines changed Original file line number Diff line number Diff line change
1
+ APP_PORT = 80
2
+
3
+ # Supabase: Database
4
+ SUPABASE_URL = ' '
5
+ # # This is Service Key, disables RLS
6
+ SUPABASE_KEY = ' '
7
+ # # Adapter Config
8
+ BASE_URL = ' '
9
+ ADAPTER_ADMIN_TOKEN = " "
10
+ VAULT_SERVICE_URL = ' '
11
+ VAULT_SERVICE_TOKEN = ' '
12
+ GUPSHUP_API_ENDPOINT = ' '
13
+
14
+ # # Orchestrator
15
+ ORCHESTRATOR_API_ENDPOINT = ' '
16
+ ORCHESTRATOR_FEEDBACK_ENDPOINT = ' '
Original file line number Diff line number Diff line change
1
+ name : Build and Push Docker Image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - dev
7
+ - prod
8
+
9
+ env :
10
+ DOCKER_USERNAME : ${{ github.actor }}
11
+ DOCKER_IMAGE_NAME : ${{ github.repository }}
12
+ DOCKER_REGISTRY : ghcr.io
13
+ DOCKER_IMAGE_TAG : ${{ github.ref_name }}
14
+
15
+ jobs :
16
+ build-and-push :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - id : lower-repo
20
+ shell : pwsh
21
+ run : |
22
+ "::set-output name=repository::$($env:DOCKER_IMAGE_NAME.ToLowerInvariant())"
23
+
24
+ - name : Checkout code
25
+ uses : actions/checkout@v2
26
+
27
+ - name : Set up Docker Buildx
28
+ uses : docker/setup-buildx-action@v2
29
+
30
+ - name : Login to Docker registry
31
+ uses : docker/login-action@v1
32
+ with :
33
+ registry : ${{ env.DOCKER_REGISTRY }}
34
+ username : ${{ env.DOCKER_USERNAME }}
35
+ password : ${{ secrets.PAT }}
36
+
37
+ - name : Build and Push Docker image
38
+ uses : docker/build-push-action@v4
39
+ with :
40
+ build-args : |
41
+ "SERVER_RELEASE_VERSION=${{ github.sha }}"
42
+ context : .
43
+ push : true
44
+ cache-from : type=gha
45
+ cache-to : type=gha,mode=max
46
+ tags : ${{ env.DOCKER_REGISTRY }}/${{ steps.lower-repo.outputs.repository }}:${{env.DOCKER_IMAGE_TAG}}
47
+ labels : org.opencontainers.image.source=https://github.com/${{steps.lower-repo.outputs.repository}}
Original file line number Diff line number Diff line change
1
+ name : Docker Image CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ "prod" ]
6
+ pull_request :
7
+ branches : [ "dev" ]
8
+
9
+ jobs :
10
+
11
+ build :
12
+
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+ - name : Build the Docker image
18
+ run : docker build . --file Dockerfile --tag my-image-name:$(date +%s)
Original file line number Diff line number Diff line change 1
- FROM node:21-bullseye
2
-
3
- RUN apt-get -q update
1
+ # Stage 1: Build the application
2
+ FROM node:18-bullseye AS builder
4
3
5
4
WORKDIR /app
6
5
7
- COPY . .
6
+ # Copy package.json and yarn.lock files
7
+ COPY package.json yarn.lock ./
8
8
9
+ # Install dependencies
9
10
RUN yarn install
10
11
12
+ # Copy the rest of the application source code
13
+ COPY . .
14
+
15
+ # Build the application
11
16
RUN yarn build
12
17
13
- ENTRYPOINT [ "yarn" , "start:prod" ]
18
+ # Stage 2: Create the run-time image
19
+ FROM node:18-bullseye
20
+
21
+ WORKDIR /app
22
+
23
+ # Copy the built application from the previous stage
24
+ COPY --from=builder /app/node_modules ./node_modules
25
+ COPY --from=builder /app/dist ./dist
26
+ COPY --from=builder /app/package.json ./
27
+ COPY --from=builder /app/yarn.lock ./
28
+
29
+ ARG SERVER_RELEASE_VERSION
30
+ ENV SERVER_RELEASE_VERSION=${SERVER_RELEASE_VERSION}
31
+
32
+ # Set the entrypoint to start the application
33
+ ENTRYPOINT [ "yarn" , "start:prod" ]
Original file line number Diff line number Diff line change 1
1
import { Module } from '@nestjs/common' ;
2
2
import { MessageController } from './controllers/inbound.message.controller' ;
3
3
import { InboundService } from './services/inbound/inbound.service' ;
4
- // import { SupabaseService } from './services/supabase.service';
5
4
import { ConfigModule } from '@nestjs/config' ;
6
5
import { OutboundService } from './services/outbound/outbound.service' ;
7
6
You can’t perform that action at this time.
0 commit comments