23 lines
		
	
	
		
			537 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			537 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM docker.io/oven/bun as base
 | |
| 
 | |
| # install dependencies into temp directory
 | |
| FROM base AS install
 | |
| WORKDIR /modules
 | |
| COPY package.json bun.lockb ./
 | |
| COPY src ./src
 | |
| RUN bun install --frozen-lockfile --production
 | |
| RUN bun run tailwind:build
 | |
| 
 | |
| # copy production dependencies and source code into final image
 | |
| FROM base AS release
 | |
| WORKDIR /app
 | |
| 
 | |
| COPY --from=install /modules/node_modules ./node_modules
 | |
| COPY --from=install /modules/public ./public
 | |
| COPY  src ./src
 | |
| 
 | |
| # run the app
 | |
| USER bun
 | |
| EXPOSE 3000/tcp
 | |
| ENTRYPOINT [ "bun", "run", "src/index.tsx" ]
 |