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 | *.tsbuildinfo | ||||||
| 
 | 
 | ||||||
| # idea files | # idea files | ||||||
| .idea | .idea | ||||||
|  | 
 | ||||||
|  | docker-compose.yaml | ||||||
| @ -1,5 +1,6 @@ | |||||||
| ##### DEPENDENCIES | ##### DEPENDENCIES | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| FROM --platform=linux/amd64 node:20-alpine AS deps | FROM --platform=linux/amd64 node:20-alpine AS deps | ||||||
| RUN apk add --no-cache libc6-compat openssl | RUN apk add --no-cache libc6-compat openssl | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| @ -27,6 +28,8 @@ ARG NEXT_PUBLIC_CLIENTVAR | |||||||
| WORKDIR /app | WORKDIR /app | ||||||
| COPY --from=deps /app/node_modules ./node_modules | COPY --from=deps /app/node_modules ./node_modules | ||||||
| COPY . . | COPY . . | ||||||
|  | ARG NEXT_PUBLIC_PAGE_URL | ||||||
|  | ENV NEXT_PUBLIC_PAGE_URL=$NEXT_PUBLIC_PAGE_URL | ||||||
| 
 | 
 | ||||||
| # ENV NEXT_TELEMETRY_DISABLED 1 | # ENV NEXT_TELEMETRY_DISABLED 1 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,22 +1,21 @@ | |||||||
| version: "3.8" | version: "3.9" | ||||||
| 
 |  | ||||||
| services: | services: | ||||||
|   app: |   app: | ||||||
|  |     platform: "linux/amd64" | ||||||
|     build: |     build: | ||||||
|       context: . |       context: . | ||||||
|       dockerfile: Dockerfile |       dockerfile: Dockerfile | ||||||
|  |       args: | ||||||
|  |         NEXT_PUBLIC_PAGE_URL: http://localhost:3000 | ||||||
|  |     working_dir: /app | ||||||
|     ports: |     ports: | ||||||
|       - "3000:3000" |       - "3000:3000" | ||||||
|  |     image: t3-app | ||||||
|     environment: |     environment: | ||||||
|       DATABASE_URL: "mysql://filehost:a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6@10.0.0.1:3306/file_hosting_db" |       - NEXTAUTH_URL=http://localhost:3000 | ||||||
|       AUTH_SECRET: "lHpKepMT0dyBHcFQzeN9B5e4Rn/DG6Lc5aiMIKa9HdY=" |       - AUTH_SECRET= | ||||||
|       AUTH_DISCORD_ID: "1360729915678392492" |       - DATABASE_URL= | ||||||
|       AUTH_DISCORD_SECRET: "lIrkEwb2PpMpLZM7Yb9pGVeT7YLgIC_C" |       - AUTH_DISCORD_ID=1360729915678392492 | ||||||
|       AUTH_TRUST_HOST: "true" |       - AUTH_DISCORD_SECRET=lIrkEwb2PpMpLZM7Yb9pGVeT7YLgIC_C | ||||||
|       SKIP_ENV_VALIDATION: "true" |       - AUTH_TRUST_HOST=true | ||||||
|       NEXT_PUBLIC_PAGE_URL: "https://file-hosting.example.com" |       - NEXT_PUBLIC_PAGE_URL=http://localhost:3000 | ||||||
|       NEXTAUTH_URL: "https://file-hosting.example.com" |  | ||||||
|     volumes: |  | ||||||
|       - type: bind |  | ||||||
|         source: /mnt/0TB/DATA/AppData/file-hosting/uploads |  | ||||||
|         target: /uploads |  | ||||||
| @ -51,7 +51,7 @@ function UploadsPage() { | |||||||
| 
 | 
 | ||||||
|   const handleDownload = async () => { |   const handleDownload = async () => { | ||||||
|     try { |     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) { |       if (!response.ok) { | ||||||
|         throw new Error("Failed to download file"); |         throw new Error("Failed to download file"); | ||||||
|       } |       } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user