Added dockerfile and docker-compose
This commit is contained in:
		
							
								
								
									
										16
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
# Typescript Build
 | 
			
		||||
FROM registry.odit.services/mirror/node:14.15.1-alpine3.12
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
COPY package.json ./
 | 
			
		||||
RUN npm i -g pnpm
 | 
			
		||||
RUN pnpm i
 | 
			
		||||
COPY tsconfig.json ./
 | 
			
		||||
COPY src ./src
 | 
			
		||||
RUN pnpm run build
 | 
			
		||||
# final image
 | 
			
		||||
FROM registry.odit.services/mirror/node:14.15.1-alpine3.12
 | 
			
		||||
COPY package.json ./
 | 
			
		||||
RUN npm i -g pnpm
 | 
			
		||||
RUN pnpm i --prod
 | 
			
		||||
COPY --from=0 /app/dist dist
 | 
			
		||||
ENTRYPOINT ["node", "dist/app.js"]
 | 
			
		||||
							
								
								
									
										9
									
								
								docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
version: "3"
 | 
			
		||||
services:
 | 
			
		||||
  mailer:
 | 
			
		||||
    build: .
 | 
			
		||||
    ports:
 | 
			
		||||
      - 4010:4010
 | 
			
		||||
    environment:
 | 
			
		||||
      APP_PORT: 4010
 | 
			
		||||
      NODE_ENV: production
 | 
			
		||||
		Reference in New Issue
	
	Block a user