added cleanup command to backup container
This commit is contained in:
		
							parent
							
								
									e0eb5d36ba
								
							
						
					
					
						commit
						c459887182
					
				| @ -19,7 +19,8 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ | |||||||
| 
 | 
 | ||||||
| RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - \ | RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - \ | ||||||
|     && echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list.d/postgres.list \ |     && echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list.d/postgres.list \ | ||||||
|     && apt-get update;apt-get -y install postgresql-client |     && apt-get update;apt-get -y install postgresql-client \ | ||||||
|  |     && rm -rf /var/lib/apt/lists/* | ||||||
| 
 | 
 | ||||||
| # create entrypoint | # create entrypoint | ||||||
| COPY containers/zammad-backup/docker-entrypoint.sh / | COPY containers/zammad-backup/docker-entrypoint.sh / | ||||||
|  | |||||||
| @ -1,7 +1,6 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| 
 | 
 | ||||||
| if [ "$1" = 'zammad-backup' ]; then | if [ "$1" = 'zammad-backup' ]; then | ||||||
| 
 |  | ||||||
|   # wait for zammad process coming up |   # wait for zammad process coming up | ||||||
|   until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do |   until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do | ||||||
|     echo "backup waiting for zammads railsserver to be ready..." |     echo "backup waiting for zammads railsserver to be ready..." | ||||||
| @ -25,5 +24,4 @@ if [ "$1" = 'zammad-backup' ]; then | |||||||
|     # wait until next backup |     # wait until next backup | ||||||
|     sleep ${BACKUP_SLEEP} |     sleep ${BACKUP_SLEEP} | ||||||
|   done |   done | ||||||
| 
 |  | ||||||
| fi | fi | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user