-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (35 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Developed By Paysys Labs
# Use Node.js as the base image
FROM node:20-alpine
ARG GH_TOKEN
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json to the container
COPY package*.json ./
COPY .npmrc .npmrc
# Install dependencies
RUN npm install
# Copy the rest of the application code to the container
COPY . .
# Build the TypeScript code
RUN npm run build
# Environment variables (May require changes based on requirements)
ENV STARTUP_TYPE=nats
ENV NODE_ENV=dev
ENV SERVER_URL=nats://localhost:4222
ENV FUNCTION_NAME=messageRelayService
ENV PRODUCER_STREAM=destination.subject
ENV CONSUMER_STREAM=interdiction-service
ENV DESTINATION_TYPE=nats
ENV DESTINATION_URL=nats://localhost:4223
ENV QUEUE=messageRelayService
ENV APM_ACTIVE=true
ENV APM_SERVICE_NAME=relay-service
ENV APM_URL=http://apm-server.development.svc.cluster.local:8200/
ENV APM_SECRET_TOKEN=
ENV LOGSTASH_LEVEL='info'
ENV SIDECAR_HOST=0.0.0.0:5000
# Expose the port the app runs on
EXPOSE 3000
# Command to start the application
CMD ["npm", "start"]