mirror of
				https://github.com/C4illin/ConvertX.git
				synced 2025-10-31 12:03:31 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			312c962cd2
			...
			nix-test
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | bba420386f | ||
|  | 74df47531c | ||
|  | 1adac8c31c | 
							
								
								
									
										61
									
								
								flake.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								flake.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | |||||||
|  | { | ||||||
|  |   "nodes": { | ||||||
|  |     "flake-utils": { | ||||||
|  |       "inputs": { | ||||||
|  |         "systems": "systems" | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1731533236, | ||||||
|  |         "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", | ||||||
|  |         "owner": "numtide", | ||||||
|  |         "repo": "flake-utils", | ||||||
|  |         "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "numtide", | ||||||
|  |         "repo": "flake-utils", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "nixpkgs": { | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1747179050, | ||||||
|  |         "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", | ||||||
|  |         "owner": "NixOS", | ||||||
|  |         "repo": "nixpkgs", | ||||||
|  |         "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "NixOS", | ||||||
|  |         "ref": "nixos-unstable", | ||||||
|  |         "repo": "nixpkgs", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "root": { | ||||||
|  |       "inputs": { | ||||||
|  |         "flake-utils": "flake-utils", | ||||||
|  |         "nixpkgs": "nixpkgs" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "systems": { | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1681028828, | ||||||
|  |         "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | ||||||
|  |         "owner": "nix-systems", | ||||||
|  |         "repo": "default", | ||||||
|  |         "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "nix-systems", | ||||||
|  |         "repo": "default", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "root": "root", | ||||||
|  |   "version": 7 | ||||||
|  | } | ||||||
							
								
								
									
										60
									
								
								flake.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								flake.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | |||||||
|  | { | ||||||
|  |   description = "ConvertX"; | ||||||
|  |  | ||||||
|  |   inputs = { | ||||||
|  |     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||||||
|  |     flake-utils.url = "github:numtide/flake-utils"; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   outputs = { self, nixpkgs, flake-utils, ... }: | ||||||
|  |     flake-utils.lib.eachDefaultSystem (system: | ||||||
|  |       let pkgs = import nixpkgs { inherit system; }; | ||||||
|  |       appSrc = ./.; | ||||||
|  |  | ||||||
|  |       app = pkgs.dockerTools.buildLayeredImage { | ||||||
|  |         name = "convertx"; | ||||||
|  |         tag = "latest"; | ||||||
|  |  | ||||||
|  |         contents = [ | ||||||
|  |           pkgs.bun | ||||||
|  |           pkgs.resvg | ||||||
|  |           pkgs.ffmpeg | ||||||
|  |           pkgs.graphicsmagick | ||||||
|  |           pkgs.ghostscript | ||||||
|  |           pkgs.vips | ||||||
|  |           pkgs.pandoc | ||||||
|  |           pkgs.texlive.combined.scheme-full | ||||||
|  |           pkgs.calibre | ||||||
|  |           pkgs.inkscape | ||||||
|  |           pkgs.poppler_utils | ||||||
|  |           pkgs.assimp | ||||||
|  |           pkgs.jxrlib | ||||||
|  |           pkgs.libheif | ||||||
|  |           pkgs.libjxl | ||||||
|  |           pkgs.python3Packages.numpy | ||||||
|  |         ]; | ||||||
|  |  | ||||||
|  |         config = { | ||||||
|  |           Env = [ | ||||||
|  |             "NODE_ENV=production" | ||||||
|  |             "PATH=/bin:/usr/bin" | ||||||
|  |           ]; | ||||||
|  |           WorkingDir = "/app"; | ||||||
|  |           Cmd = [ "bun" "run" "./src/index.tsx" ]; | ||||||
|  |           ExposedPorts = { | ||||||
|  |             "3000/tcp" = {}; | ||||||
|  |           }; | ||||||
|  |         }; | ||||||
|  |  | ||||||
|  |         extraCommands = '' | ||||||
|  |           export PATH=${pkgs.bun}/bin:$PATH | ||||||
|  |           mkdir -p /app | ||||||
|  |           cp -r ${./dist}/* /app/ | ||||||
|  |         ''; | ||||||
|  |       }; | ||||||
|  |  | ||||||
|  |       in { | ||||||
|  |         packages.default = app; | ||||||
|  |       } | ||||||
|  |     ); | ||||||
|  | } | ||||||
| @@ -4,6 +4,7 @@ | |||||||
|   "scripts": { |   "scripts": { | ||||||
|     "dev": "bun run --watch src/index.tsx", |     "dev": "bun run --watch src/index.tsx", | ||||||
|     "hot": "bun run --hot src/index.tsx", |     "hot": "bun run --hot src/index.tsx", | ||||||
|  |     "start": "bun run src/index.tsx", | ||||||
|     "format": "eslint --fix .", |     "format": "eslint --fix .", | ||||||
|     "build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css", |     "build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css", | ||||||
|     "lint": "run-p 'lint:*'", |     "lint": "run-p 'lint:*'", | ||||||
| @@ -51,4 +52,4 @@ | |||||||
|     "typescript": "^5.8.3", |     "typescript": "^5.8.3", | ||||||
|     "typescript-eslint": "^8.32.0" |     "typescript-eslint": "^8.32.0" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user