modified: .gitignore
modified: Dockerfile modified: docker-compose.yml modified: src/app/share/page.tsx
This commit is contained in:
		
							parent
							
								
									089f80cb00
								
							
						
					
					
						commit
						b5dc5eea1f
					
				
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -45,4 +45,6 @@ yarn-error.log* | ||||
| *.tsbuildinfo | ||||
| 
 | ||||
| # idea files | ||||
| .idea | ||||
| .idea | ||||
| 
 | ||||
| docker-compose.yaml | ||||
| @ -1,5 +1,6 @@ | ||||
| ##### DEPENDENCIES | ||||
| 
 | ||||
| 
 | ||||
| FROM --platform=linux/amd64 node:20-alpine AS deps | ||||
| RUN apk add --no-cache libc6-compat openssl | ||||
| WORKDIR /app | ||||
| @ -27,6 +28,8 @@ ARG NEXT_PUBLIC_CLIENTVAR | ||||
| WORKDIR /app | ||||
| COPY --from=deps /app/node_modules ./node_modules | ||||
| COPY . . | ||||
| ARG NEXT_PUBLIC_PAGE_URL | ||||
| ENV NEXT_PUBLIC_PAGE_URL=$NEXT_PUBLIC_PAGE_URL | ||||
| 
 | ||||
| # ENV NEXT_TELEMETRY_DISABLED 1 | ||||
| 
 | ||||
|  | ||||
| @ -1,22 +1,21 @@ | ||||
| version: "3.8" | ||||
| 
 | ||||
| version: "3.9" | ||||
| services: | ||||
|   app: | ||||
|     platform: "linux/amd64" | ||||
|     build: | ||||
|       context: . | ||||
|       dockerfile: Dockerfile | ||||
|       args: | ||||
|         NEXT_PUBLIC_PAGE_URL: http://localhost:3000 | ||||
|     working_dir: /app | ||||
|     ports: | ||||
|       - "3000:3000" | ||||
|     image: t3-app | ||||
|     environment: | ||||
|       DATABASE_URL: "mysql://filehost:a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6@10.0.0.1:3306/file_hosting_db" | ||||
|       AUTH_SECRET: "lHpKepMT0dyBHcFQzeN9B5e4Rn/DG6Lc5aiMIKa9HdY=" | ||||
|       AUTH_DISCORD_ID: "1360729915678392492" | ||||
|       AUTH_DISCORD_SECRET: "lIrkEwb2PpMpLZM7Yb9pGVeT7YLgIC_C" | ||||
|       AUTH_TRUST_HOST: "true" | ||||
|       SKIP_ENV_VALIDATION: "true" | ||||
|       NEXT_PUBLIC_PAGE_URL: "https://file-hosting.example.com" | ||||
|       NEXTAUTH_URL: "https://file-hosting.example.com" | ||||
|     volumes: | ||||
|       - type: bind | ||||
|         source: /mnt/0TB/DATA/AppData/file-hosting/uploads | ||||
|         target: /uploads | ||||
|       - NEXTAUTH_URL=http://localhost:3000 | ||||
|       - AUTH_SECRET= | ||||
|       - DATABASE_URL= | ||||
|       - AUTH_DISCORD_ID=1360729915678392492 | ||||
|       - AUTH_DISCORD_SECRET=lIrkEwb2PpMpLZM7Yb9pGVeT7YLgIC_C | ||||
|       - AUTH_TRUST_HOST=true | ||||
|       - NEXT_PUBLIC_PAGE_URL=http://localhost:3000 | ||||
| @ -51,7 +51,7 @@ function UploadsPage() { | ||||
| 
 | ||||
|   const handleDownload = async () => { | ||||
|     try { | ||||
|       const response = await fetch(`/api/files/download?fileId=${encodeURIComponent(fileId ?? "")}`); | ||||
|       const response = await fetch(`/api/files/download?fileId=${encodeURIComponent(fileDetails?.name ?? "")}`); // Use optional chaining
 | ||||
|       if (!response.ok) { | ||||
|         throw new Error("Failed to download file"); | ||||
|       } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user