 4075f0f922
			
		
	
	
		4075f0f922
		
	
	
	
	
		
			
			I tried to use wal-e as mentioned on dockerhub (see https://hub.docker.com/r/mattermost/mattermost-prod-db). To do the base backup I had to do some additional steps (see https://github.com/mattermost/mattermost-docker/issues/346): - mount a volume into the database docker container (path in the container is /etc/wal-e.d/env) and put all credentials and the s3 prefix to this folder - exec into the container and create a superuser (Command: CREATE USER postgres SUPERUSER;) Now it still fails with the message, that the package *pv* is missing
		
			
				
	
	
		
			31 lines
		
	
	
		
			791 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			791 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM postgres:9.4-alpine
 | |
| 
 | |
| ENV DEFAULT_TIMEZONE UTC
 | |
| 
 | |
| # Install some packages to use WAL
 | |
| RUN apk add --no-cache \
 | |
|       build-base \
 | |
|       curl \
 | |
|       libc6-compat \
 | |
|       libffi-dev \
 | |
|       linux-headers \
 | |
|       python-dev \
 | |
|       py-pip \
 | |
|       py-cryptography \
 | |
|       pv \
 | |
|     && pip --no-cache-dir install 'wal-e<1.0.0' envdir \
 | |
|     && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
 | |
| 
 | |
| # Add wale script
 | |
| COPY setup-wale.sh /docker-entrypoint-initdb.d/
 | |
| 
 | |
| #Healthcheck to make sure container is ready
 | |
| HEALTHCHECK CMD pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || exit 1
 | |
| 
 | |
| # Add and configure entrypoint and command
 | |
| COPY entrypoint.sh /
 | |
| ENTRYPOINT ["/entrypoint.sh"]
 | |
| CMD ["postgres"]
 | |
| 
 | |
| VOLUME ["/var/run/postgresql", "/usr/share/postgresql/", "/var/lib/postgresql/data", "/tmp", "/etc/wal-e.d/env"]
 |