mirror of
				https://github.com/i701/sarlink-portal.git
				synced 2025-11-04 00:16:59 +00:00 
			
		
		
		
	docker build works now
This commit is contained in:
		@@ -1,13 +0,0 @@
 | 
				
			|||||||
FROM node:18
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use bash as the default shell
 | 
					 | 
				
			||||||
SHELL ["/bin/bash", "-c"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ENV NODE_ENV=production
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
WORKDIR /var/www/html
 | 
					 | 
				
			||||||
COPY .. /var/www/html
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
RUN yarn install && yarn build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CMD yarn start
 | 
					 | 
				
			||||||
							
								
								
									
										29
									
								
								.build/prod/bun.Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.build/prod/bun.Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					FROM oven/bun:1.1.42-debian AS builder
 | 
				
			||||||
 | 
					WORKDIR /var/www/html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENV NEXT_TELEMETRY_DISABLED=1
 | 
				
			||||||
 | 
					ENV DATABASE_URL="postgresql://dummy:dummy@dummy:5432/dummy"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY package.json package-lock.json ./
 | 
				
			||||||
 | 
					COPY prisma ./prisma/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN bun install --frozen-lockfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN bunx prisma generate
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY . .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN bun run build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FROM oven/bun:1.1.42-debian
 | 
				
			||||||
 | 
					WORKDIR /var/www/html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY --from=builder /var/www/html/package.json ./
 | 
				
			||||||
 | 
					COPY --from=builder /var/www/html/node_modules ./node_modules
 | 
				
			||||||
 | 
					COPY --from=builder /var/www/html/.next ./.next
 | 
				
			||||||
 | 
					COPY --from=builder /var/www/html/public ./public
 | 
				
			||||||
 | 
					COPY --from=builder /var/www/html/prisma ./prisma
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VOLUME /var/www/html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CMD bun start
 | 
				
			||||||
@@ -1,7 +1,13 @@
 | 
				
			|||||||
services:
 | 
					services:
 | 
				
			||||||
   node:
 | 
					   app:
 | 
				
			||||||
      build:
 | 
					      build:
 | 
				
			||||||
        context: ../../
 | 
					        context: ../../
 | 
				
			||||||
        dockerfile: .build/prod/Dockerfile
 | 
					        dockerfile: .build/prod/bun.Dockerfile
 | 
				
			||||||
      hostname: sarlink-portal
 | 
					      hostname: sarlink-portal
 | 
				
			||||||
      image: git.shihaam.dev/sarlink/sarlink-portal
 | 
					      image: git.shihaam.dev/sarlink/sarlink-portal/app
 | 
				
			||||||
 | 
					   prisma-studio:
 | 
				
			||||||
 | 
					      build:
 | 
				
			||||||
 | 
					        context: .
 | 
				
			||||||
 | 
					        dockerfile: ./prisma.Dockerfile
 | 
				
			||||||
 | 
					      hostname: sarlink-portal-database-ui
 | 
				
			||||||
 | 
					      image: git.shihaam.dev/sarlink/sarlink-portal/prisma-studio
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								.build/prod/prisma.Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.build/prod/prisma.Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					FROM oven/bun:1.1.42-debian
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WORKDIR /var/www/html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CMD bunx prisma studio
 | 
				
			||||||
		Reference in New Issue
	
	Block a user