added multistage build for docker
This commit is contained in:
		
							parent
							
								
									9e2c372956
								
							
						
					
					
						commit
						f1cdbe3c43
					
				
					 4 changed files with 14 additions and 3 deletions
				
			
		
							
								
								
									
										9
									
								
								Dockerfile.multistage
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								Dockerfile.multistage
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | ||||||
|  | FROM node:latest AS builder | ||||||
|  | WORKDIR /var/build/ | ||||||
|  | COPY ./ /var/build/ | ||||||
|  | RUN npm install | ||||||
|  | RUN npm run build | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | FROM nginx:alpine | ||||||
|  | COPY --from=builder /var/build/dist /usr/share/nginx/html | ||||||
							
								
								
									
										3
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -29,3 +29,6 @@ clean: | ||||||
| 		rm -f $(CURDIR)/src/lib/crypttool.wasm | 		rm -f $(CURDIR)/src/lib/crypttool.wasm | ||||||
| 		rm -rf $(CURDIR)/node_modules/* | 		rm -rf $(CURDIR)/node_modules/* | ||||||
| 		rm -rf $(CURDIR)/dist | 		rm -rf $(CURDIR)/dist | ||||||
|  | 		rm -rf $(CURDIR)/.yarn | ||||||
|  | 		rm -rf $(CURDIR)/package-lock.json | ||||||
|  | 		rm -rf $(CURDIR)/yarn.lock | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ | ||||||
| 
 | 
 | ||||||
|   <p class="read-the-docs"> |   <p class="read-the-docs"> | ||||||
|     You can drag and drop a file on the "Encrypt" Button to encrypt it with a randomly generated password, and decrypt a file encrypted with this tool. |     You can drag and drop a file on the "Encrypt" Button to encrypt it with a randomly generated password, and decrypt a file encrypted with this tool. | ||||||
|     For more information check out the Documentation.  |     For more information check out the <a href="https://codeberg.org/jmbit/crypttool/src/branch/main/docs/index.md">Documentation</a>.  | ||||||
|   </p> |   </p> | ||||||
| 
 | 
 | ||||||
|   <Footer/> |   <Footer/> | ||||||
|  |  | ||||||
|  | @ -1,9 +1,8 @@ | ||||||
| import { defineConfig } from 'vite'; | import { defineConfig } from 'vite'; | ||||||
| import { svelte } from '@sveltejs/vite-plugin-svelte'; | import { svelte } from '@sveltejs/vite-plugin-svelte'; | ||||||
| import wasm from "vite-plugin-wasm"; |  | ||||||
| import topLevelAwait from "vite-plugin-top-level-await"; | import topLevelAwait from "vite-plugin-top-level-await"; | ||||||
| 
 | 
 | ||||||
| // https://vitejs.dev/config/
 | // https://vitejs.dev/config/
 | ||||||
| export default defineConfig({ | export default defineConfig({ | ||||||
|   plugins: [svelte(), wasm(), topLevelAwait()], |   plugins: [svelte(), topLevelAwait()], | ||||||
| }) | }) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue