23 lines
		
	
	
		
			427 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			23 lines
		
	
	
		
			427 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								# nodejs build environment
							 | 
						||
| 
								 | 
							
								FROM alpine:latest as nodejs
							 | 
						||
| 
								 | 
							
								WORKDIR /
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								RUN apk add git
							 | 
						||
| 
								 | 
							
								RUN git clone https://gitlab.com/kzotkin/hiveemulator
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								RUN apk add npm
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								WORKDIR /hiveemulator/src/MapClient/
							 | 
						||
| 
								 | 
							
								RUN npm install
							 | 
						||
| 
								 | 
							
								RUN npm run build
							 | 
						||
| 
								 | 
							
								RUN rm public/config.json
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								# production environment
							 | 
						||
| 
								 | 
							
								FROM nginx:alpine
							 | 
						||
| 
								 | 
							
								COPY --from=nodejs /hiveemulator/src/MapClient/dist/ /usr/share/nginx/html/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								EXPOSE 80
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								ENTRYPOINT ["nginx", "-g", "daemon off;"]
							 |