2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# dotnet build environment
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FROM alpine:latest as dotnet
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								WORKDIR /
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RUN apk add dotnet8-sdk git
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN git clone https://gitlab.com/kzotkin/hiveemulator
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								WORKDIR /hiveemulator/src/CommunicationControl/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN dotnet build DevOpsProject/DevOpsProject.CommunicationControl.API.csproj
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN dotnet build DevOpsProject.HiveMind.API/DevOpsProject.HiveMind.API.csproj
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# nodejs build environment
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#FROM alpine:latest as nodejs
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#WORKDIR /
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN apk add git npm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN git clone https://gitlab.com/kzotkin/hiveemulator
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#WORKDIR /hiveemulator/src/MapClient/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN npm install
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN npm run build
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# production environment
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								FROM alpine:latest
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								WORKDIR /
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN apk add dotnet8-sdk redis openrc lighttpd npm
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#RUN apk add git dotnet8-sdk redis openrc npm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN apk add git aspnetcore8-runtime redis openrc npm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN apk add aspnetcore8-runtime redis openrc npm
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#RUN git clone https://gitlab.com/kzotkin/hiveemulator
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#COPY --from=nodejs /hiveemulator/ /hiveemulator/
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								COPY --from=dotnet /hiveemulator/ /hiveemulator/
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#COPY --from=nodejs /hiveemulator/src/MapClient/dist/* /var/www/localhost/htdocs/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN mkdir /hive-cc
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#COPY --from=0 /hiveemulator/src/CommunicationControl/DevOpsProject/* /hive-cc/
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#COPY --from=dotnet /hiveemulator/src/CommunicationControl/DevOpsProject/* /hiveemulator/src/CommunicationControl/DevOpsProject/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#COPY --from=dotnet /hiveemulator/src/CommunicationControl/DevOpsProject.HiveMind.API/* /hiveemulator/src/CommunicationControl/DevOpsProject.HiveMind.API/
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN mkdir /hive-hm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#COPY --from=0 /hiveemulator/src/CommunicationControl/DevOpsProject.HiveMind.API/* /hive-hm/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								WORKDIR /hiveemulator/src/MapClient/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN npm install
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN sed -i 's/localhost/10\.1\.1\.2/' public/config.json
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-04-09 13:34:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								WORKDIR /
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-31 19:50:26 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY ./daemon-files/hive-cc /etc/init.d/hive-cc
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY ./daemon-files/hive-hm /etc/init.d/hive-hm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY ./daemon-files/hive-map /etc/init.d/hive-map
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN chmod u+x /etc/init.d/hive-hm /etc/init.d/hive-cc /etc/init.d/hive-map
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN mkdir /etc/rulevels/{stage-redis,stage-cc,stage-hm,stage-map}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN rc-update add redis default
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN rc-update add hive-hm default
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN rc-update add hive-cc default
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#RUN rc-update add hive-map default
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CMD sh -c "openrc default ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rc-service redis start ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rc-service hive-cc start ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rc-service hive-hm start ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rc-service hive-map start ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									exec sh"
							 | 
						
					
						
							
								
									
										
										
										
											2025-05-28 20:55:12 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 |