mirror of
				https://github.com/craigerl/aprsd.git
				synced 2025-10-31 04:40:22 -04:00 
			
		
		
		
	Added listen.sh for docker
This patch adds the listen.sh entry point for the docker image.
This commit is contained in:
		
							parent
							
								
									483afce5ad
								
							
						
					
					
						commit
						c353877321
					
				| @ -52,6 +52,7 @@ VOLUME ["/config", "/plugins"] | ||||
| 
 | ||||
| USER $APRS_USER | ||||
| ADD bin/run.sh /usr/local/bin | ||||
| ADD bin/listen.sh /usr/local/bin | ||||
| ENTRYPOINT ["/usr/local/bin/run.sh"] | ||||
| 
 | ||||
| HEALTHCHECK --interval=5m --timeout=12s --start-period=30s \ | ||||
|  | ||||
| @ -64,6 +64,7 @@ USER $APRS_USER | ||||
| VOLUME ["/config", "/plugins"] | ||||
| 
 | ||||
| ADD bin/run.sh $HOME/ | ||||
| ADD bin/listen.sh $HOME/ | ||||
| ENTRYPOINT ["/home/aprs/run.sh"] | ||||
| 
 | ||||
| HEALTHCHECK --interval=5m --timeout=12s --start-period=30s \ | ||||
|  | ||||
							
								
								
									
										31
									
								
								docker/bin/listen.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										31
									
								
								docker/bin/listen.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,31 @@ | ||||
| #!/usr/bin/env bash | ||||
| set -x | ||||
| 
 | ||||
| if [ ! -z "${APRSD_PLUGINS}" ]; then | ||||
|     OLDIFS=$IFS | ||||
|     IFS=',' | ||||
|     echo "Installing pypi plugins '$APRSD_PLUGINS'"; | ||||
|     for plugin in ${APRSD_PLUGINS}; do | ||||
|         IFS=$OLDIFS | ||||
|         # call your procedure/other scripts here below | ||||
|         echo "Installing '$plugin'" | ||||
|         pip3 install $plugin | ||||
|     done | ||||
| fi | ||||
| 
 | ||||
| if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then | ||||
|     LOG_LEVEL="DEBUG" | ||||
| fi | ||||
| 
 | ||||
| echo "Log level is set to ${LOG_LEVEL}"; | ||||
| 
 | ||||
| # check to see if there is a config file | ||||
| APRSD_CONFIG="/config/aprsd.conf" | ||||
| if [ ! -e "$APRSD_CONFIG" ]; then | ||||
|     echo "'$APRSD_CONFIG' File does not exist. Creating." | ||||
|     aprsd sample-config > $APRSD_CONFIG | ||||
| fi | ||||
| 
 | ||||
| export COLUMNS=200 | ||||
| python3 -m rich.diagnose | ||||
| exec aprsd listen -c $APRSD_CONFIG --loglevel ${LOG_LEVEL} ${EXTRA_ARGS} | ||||
| @ -89,7 +89,7 @@ then | ||||
|     echo "Build -DEV- with tag=${TAG} BRANCH=${BRANCH} platforms?=${PLATFORMS}" | ||||
|     # Use this script to locally build the docker image | ||||
|     docker buildx build --push --platform $PLATFORMS \ | ||||
|         -t harbor.hemna.com/hemna6969/aprsd:$TAG \ | ||||
|         -t hemna6969/aprsd:$TAG \ | ||||
|         -f Dockerfile-dev --build-arg branch=$BRANCH \ | ||||
|         --build-arg BUILDX_QEMU_ENV=true \ | ||||
|         --no-cache . | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user