Browse Source
			
			
			Feature/optimize docker image (#3642)
			
				* Remove redundant docker image layers
* Update prisma binary target of prisma
* Update changelog
			
			
				pull/3651/head
			
			
				2.103.0-alpha
			
		 
		
			
				
					
						 Nuno
					
					1 year ago
						Nuno
					
					1 year ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 4 changed files with 
23 additions and 
15 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
- 
					
					
					 
					Dockerfile
				
- 
					
					
					 
					nx.json
				
- 
					
					
					 
					prisma/schema.prisma
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. | 
			
		
	
		
			
				
					|  |  |  | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | 
			
		
	
		
			
				
					|  |  |  | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | ## 2.103.0-alpha - 2024-08-08 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | ### Changed | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | - Optimized the docker image layers to reduce the image size | 
			
		
	
		
			
				
					|  |  |  | - Updated the binary targets of `debian-openssl` for `prisma` | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | ## 2.102.0 - 2024-08-07 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | ### Added | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -3,6 +3,14 @@ FROM --platform=$BUILDPLATFORM node:20-slim AS builder | 
			
		
	
		
			
				
					|  |  |  | # Build application and add additional files | 
			
		
	
		
			
				
					|  |  |  | WORKDIR /ghostfolio | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | RUN apt-get update && apt-get install -y --no-install-suggests \ | 
			
		
	
		
			
				
					|  |  |  |   g++ \ | 
			
		
	
		
			
				
					|  |  |  |   git \ | 
			
		
	
		
			
				
					|  |  |  |   make \ | 
			
		
	
		
			
				
					|  |  |  |   openssl \ | 
			
		
	
		
			
				
					|  |  |  |   python3 \ | 
			
		
	
		
			
				
					|  |  |  |   && rm -rf /var/lib/apt/lists/* | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | # Only add basic files without the application itself to avoid rebuilding | 
			
		
	
		
			
				
					|  |  |  | # layers when files (package.json etc.) have not changed | 
			
		
	
		
			
				
					|  |  |  | COPY ./CHANGELOG.md CHANGELOG.md | 
			
		
	
	
		
			
				
					|  |  | @ -11,13 +19,6 @@ COPY ./package.json package.json | 
			
		
	
		
			
				
					|  |  |  | COPY ./package-lock.json package-lock.json | 
			
		
	
		
			
				
					|  |  |  | COPY ./prisma/schema.prisma prisma/schema.prisma | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | RUN apt-get update && apt-get install -y --no-install-suggests \ | 
			
		
	
		
			
				
					|  |  |  |   g++ \ | 
			
		
	
		
			
				
					|  |  |  |   git \ | 
			
		
	
		
			
				
					|  |  |  |   make \ | 
			
		
	
		
			
				
					|  |  |  |   openssl \ | 
			
		
	
		
			
				
					|  |  |  |   python3 \ | 
			
		
	
		
			
				
					|  |  |  |   && rm -rf /var/lib/apt/lists/* | 
			
		
	
		
			
				
					|  |  |  | RUN npm install | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | # See https://github.com/nrwl/nx/issues/6586 for further details | 
			
		
	
	
		
			
				
					|  |  | @ -58,9 +59,8 @@ RUN apt-get update && apt-get install -y --no-install-suggests \ | 
			
		
	
		
			
				
					|  |  |  |   openssl \ | 
			
		
	
		
			
				
					|  |  |  |   && rm -rf /var/lib/apt/lists/* | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps | 
			
		
	
		
			
				
					|  |  |  | COPY ./docker/entrypoint.sh /ghostfolio/entrypoint.sh | 
			
		
	
		
			
				
					|  |  |  | RUN chown -R node:node /ghostfolio | 
			
		
	
		
			
				
					|  |  |  | COPY --chown=node:node --from=builder /ghostfolio/dist/apps /ghostfolio/apps | 
			
		
	
		
			
				
					|  |  |  | COPY --chown=node:node ./docker/entrypoint.sh /ghostfolio/entrypoint.sh | 
			
		
	
		
			
				
					|  |  |  | WORKDIR /ghostfolio/apps/api | 
			
		
	
		
			
				
					|  |  |  | EXPOSE ${PORT:-3333} | 
			
		
	
		
			
				
					|  |  |  | USER node | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -61,12 +61,13 @@ | 
			
		
	
		
			
				
					|  |  |  |     "production": [ | 
			
		
	
		
			
				
					|  |  |  |       "default", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/tsconfig.spec.json", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/jest.config.[jt]s", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/.storybook/**/*", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/.storybook/**/*", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/jest.config.[jt]s", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/src/test-setup.[jt]s", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/tsconfig.storybook.json", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/src/test-setup.[jt]s" | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/tsconfig.spec.json", | 
			
		
	
		
			
				
					|  |  |  |       "!{projectRoot}/webpack.config.js" | 
			
		
	
		
			
				
					|  |  |  |     ] | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   "nxCloudAccessToken": "Mjg0ZGQ2YjAtNGI4NS00NmYwLThhOWEtMWZmNmQzODM4YzU4fHJlYWQ=", | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -1,7 +1,7 @@ | 
			
		
	
		
			
				
					|  |  |  | generator client { | 
			
		
	
		
			
				
					|  |  |  |   provider        = "prisma-client-js" | 
			
		
	
		
			
				
					|  |  |  |   previewFeatures = [] | 
			
		
	
		
			
				
					|  |  |  |   binaryTargets   = ["debian-openssl-1.1.x", "linux-arm64-openssl-3.0.x", "native"] | 
			
		
	
		
			
				
					|  |  |  |   binaryTargets   = ["debian-openssl-3.0.x", "linux-arm64-openssl-3.0.x", "native"] | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | datasource db { | 
			
		
	
	
		
			
				
					|  |  | 
 |