Browse Source
			
			
			Merge pull request #589 from H3npi/H3npi-patch-1
			
				Adds Healthcheck for default docker container
			
			
				pull/604/head
			
			
		 
		
			
				
					
						
						Daniel García
					
					6 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 11 changed files with 
49 additions and 
0 deletions
			 
			
		 
		
			
				- 
					
					
					 
					docker/aarch64/mysql/Dockerfile
				
 
			
				- 
					
					
					 
					docker/aarch64/sqlite/Dockerfile
				
 
			
				- 
					
					
					 
					docker/amd64/mysql/Dockerfile
				
 
			
				- 
					
					
					 
					docker/amd64/mysql/Dockerfile.alpine
				
 
			
				- 
					
					
					 
					docker/amd64/sqlite/Dockerfile
				
 
			
				- 
					
					
					 
					docker/amd64/sqlite/Dockerfile.alpine
				
 
			
				- 
					
					
					 
					docker/armv6/mysql/Dockerfile
				
 
			
				- 
					
					
					 
					docker/armv6/sqlite/Dockerfile
				
 
			
				- 
					
					
					 
					docker/armv7/mysql/Dockerfile
				
 
			
				- 
					
					
					 
					docker/armv7/sqlite/Dockerfile
				
 
			
				- 
					
					
					 
					docker/healthcheck.sh
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -97,5 +97,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/aarch64-unknown-linux-gnu/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -97,5 +97,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/aarch64-unknown-linux-gnu/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -94,5 +94,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build app/target/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -76,5 +76,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -94,5 +94,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build app/target/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -76,5 +76,10 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -97,5 +97,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/arm-unknown-linux-gnueabi/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -97,5 +97,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/arm-unknown-linux-gnueabi/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -98,5 +98,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -97,5 +97,9 @@ COPY Rocket.toml . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=vault /web-vault ./web-vault | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs . | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					COPY docker/healthcheck.sh ./healthcheck.sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					HEALTHCHECK --interval=10s --timeout=1s CMD bash healthcheck.sh || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					# Configures the startup! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					CMD ["./bitwarden_rs"] | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					@ -0,0 +1,8 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#!/usr/bin/env sh | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					if [ -z "$ROCKET_TLS"] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					then | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  curl --fail http://localhost:${ROCKET_PORT:-"80"}/alive || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  curl --fail https://localhost:${ROCKET_PORT:-"80"}/alive || exit 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					fi |