diff --git a/Dockerfile.postgresql b/Dockerfile.postgresql new file mode 100644 index 0000000..06ba826 --- /dev/null +++ b/Dockerfile.postgresql @@ -0,0 +1,14 @@ +FROM postgresql +MAINTAINER André Bauer + +LABEL org.label-schema.build-date="$BUILD_DATE" \ + org.label-schema.name="Zammad" \ + org.label-schema.license="AGPL-3.0" \ + org.label-schema.description="Docker container for Zammad - postgresql" \ + org.label-schema.url="https://zammad.org" \ + org.label-schema.vcs-url="https://github.com/zammad/zammad" \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vendor="Zammad" \ + org.label-schema.schema-version="1.0" \ + org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up --build" + diff --git a/docker-compose.yml b/docker-compose.yml index dfd95ae..ddc4471 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,9 @@ services: volumes: - data-zammad:/home/zammad volumes: - data-zammad: + data-postgresql: driver: local data-ruby: driver: local + data-zammad: + driver: local diff --git a/hooks/build b/hooks/build new file mode 100755 index 0000000..18927a2 --- /dev/null +++ b/hooks/build @@ -0,0 +1,14 @@ +#!/bin/bash +# +# build hook for dockerhubs autobuild feature +# builds stable and develop images from only one branch +# + +. "hooks/config" + +for DOCKER_IMAGE in ${DOCKER_IMAGES}; do + + echo "Build Zammad Docker image ${DOCKER_IMAGE} for DockerHubs ${DOCKER_REPO}:${DOCKER_IMAGE} repo" + docker build --build-arg PACKAGER_REPO=${PACKAGER_REPO} --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REPO}:${DOCKER_IMAGE} Dockerfile.${DOCKER_IMAGE} + +done diff --git a/hooks/config b/hooks/config new file mode 100644 index 0000000..811149b --- /dev/null +++ b/hooks/config @@ -0,0 +1,7 @@ +#!/bin/bash +# +# build hooks +# + +DOCKER_IMAGES="elasticsearch nginx postgresql zammad" +DOCKER_REPO="monotek/zammad-docker-compose" diff --git a/hooks/push b/hooks/push new file mode 100755 index 0000000..d992657 --- /dev/null +++ b/hooks/push @@ -0,0 +1,14 @@ +#!/bin/bash +# +# build hook for dockerhubs autobuild feature +# + +. "hooks/config" + +for DOCKER_IMAGE in ${DOCKER_IMAGES}; do + + echo "Push Zammad Docker image ${DOCKER_IMAGE} to DockerHubs ${DOCKER_REPO}:${DOCKER_IMAGE} repo" + docker push ${DOCKER_REPO}:${DOCKER_IMAGE} + +done +