Commit f4af022c authored by Dominique Feyer's avatar Dominique Feyer

TASK: Initial version

parents
Pipeline #869 passed with stage
in 1 minute and 19 seconds
destination
image: docker:latest
services:
- docker:dind
before_script:
- docker info
build:
stage: build
script:
- docker build -t ttree/phpbu:4.0.6 .
- docker tag ttree/phpbu:4.0.6 ttree/phpbu:4.0
- docker tag ttree/phpbu:4.0.6 ttree/phpbu:latest
FROM php:7.1.2-alpine
MAINTAINER Dominique Feyer <dfeyer@ttree.ch>
RUN set -ex \
&& apk add --no-cache wget tar mysql-client openssl \
&& mkdir /source /destination
ADD ./files/phpbu.phar /usr/local/bin/phpbu
RUN set -ex \
&& chmod +x /usr/local/bin/phpbu
ADD ./files/phpbu.xml /phpbu.xml
ADD ./files/.env /.env
ENTRYPOINT ["/usr/local/bin/phpbu"]
CMD ["--colors", "--configuration=/phpbu.xml"]
build:
docker build -t ttree/phpbu:4.0.6 .
docker tag ttree/phpbu:4.0.6 ttree/phpbu:4.0
docker tag ttree/phpbu:4.0.6 ttree/phpbu:latest
push:
docker push ttree/phpbu:4.0.6
docker push ttree/phpbu:4.0
docker push ttree/phpbu:latest
SOURCE=/source
CRYPT_WITH=aes-256-cbc
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<phpbu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/4.0/phpbu.xsd">
<adapters>
<adapter type="env" name="env"></adapter>
<adapter type="dotenv" name="dotenv">
<option name="file" value="/.env"/>
</adapter>
</adapters>
<backups>
<backup>
<source type="tar">
<option name="path" value="adapter:dotenv:SOURCE"/>
</source>
<target dirname="/destination" filename="tar-%Y%m%d-%H%i.tar" compress="bzip2"/>
<crypt type="openssl">
<option name="password" value="adapter:env:CRYPT_PASSWORD"/>
<option name="algorithm" value="adapter:dotenv:CRYPT_WITH"/>
</crypt>
<sync type="amazons3">
<option name="key" value="adapter:env:AWS_KEY"/>
<option name="secret" value="adapter:env:AWS_SECRET"/>
<option name="bucket" value="adapter:env:AWS_BUCKET"/>
<option name="region" value="adapter:env:AWS_REGION"/>
<option name="path" value="adapter:env:AWS_PATH"/>
</sync>
<cleanup type="quantity">
<option name="amount" value="10"/>
</cleanup>
</backup>
<backup>
<source type="mysqldump">
<option name="host" value="mysql"/>
<option name="user" value="root"/>
<option name="password" value="root"/>
</source>
<target dirname="/destination" filename="database-%Y%m%d-%H%i.sql" compress="bzip2"/>
<crypt type="openssl">
<option name="password" value="adapter:env:CRYPT_PASSWORD"/>
<option name="algorithm" value="adapter:dotenv:CRYPT_WITH"/>
</crypt>
<sync type="amazons3">
<option name="key" value="adapter:env:AWS_KEY"/>
<option name="secret" value="adapter:env:AWS_SECRET"/>
<option name="bucket" value="adapter:env:AWS_BUCKET"/>
<option name="region" value="adapter:env:AWS_REGION"/>
<option name="path" value="adapter:env:AWS_PATH"/>
</sync>
<cleanup type="quantity">
<option name="amount" value="10"/>
</cleanup>
</backup>
</backups>
</phpbu>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment