add init demos
This commit is contained in:
		
							
								
								
									
										24
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
FROM oven/bun:alpine
 | 
			
		||||
# From bun:latest
 | 
			
		||||
 | 
			
		||||
# 创建应用目录
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
COPY server/package.json ./
 | 
			
		||||
 | 
			
		||||
# 复制源码
 | 
			
		||||
COPY ./server ./
 | 
			
		||||
 | 
			
		||||
RUN bun install
 | 
			
		||||
 | 
			
		||||
# 构建(可选)
 | 
			
		||||
# RUN bun run build
 | 
			
		||||
 | 
			
		||||
# 暴露端口
 | 
			
		||||
EXPOSE 4005
 | 
			
		||||
 | 
			
		||||
# 启动服务
 | 
			
		||||
CMD ["bun", "start"]
 | 
			
		||||
 | 
			
		||||
# 保持容器运行
 | 
			
		||||
# CMD ["tail", "-f", "/dev/null"]
 | 
			
		||||
		Reference in New Issue
	
	Block a user