Commit f24d0a0b authored by collaboration's avatar collaboration
Browse files

init limesurvey

parents
Pipeline #49 passed with stages
in 2 minutes and 57 seconds
image: docker:latest
stages:
- build
- release
- deploy
#services:
# - docker:dind
variables:
# DOCKER_HOST: tcp://docker:2375
DOCKER_HOST: unix:///var/run/docker.sock
#before_script:
# - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
pre:
stage: build
tags:
# - dind
- socket
script:
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
- docker version
- docker info
build:
stage: build
tags:
# - dind
- socket
script:
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
- cd docker/
- docker build --pull -t ${CI_REGISTRY_IMAGE}:${CI_BUILD_REF} .
- docker push ${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}
release-image:
stage: release
only:
- tags
tags:
# - dind
- socket
script:
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
- echo "pull previous build"
- docker pull ${CI_REGISTRY_IMAGE}:${CI_BUILD_REF}
- echo "push tagged image"
- docker tag ${CI_REGISTRY_IMAGE}:${CI_BUILD_REF} ${CI_REGISTRY_IMAGE}:${CI_BUILD_TAG}
- docker push ${CI_REGISTRY_IMAGE}:${CI_BUILD_TAG}
- echo "push latest image"
- docker tag ${CI_REGISTRY_IMAGE}:${CI_BUILD_REF} ${CI_REGISTRY_IMAGE}:latest
- docker push ${CI_REGISTRY_IMAGE}:latest
deploy-container:
stage: deploy
when: manual
# only:
# - tags
image: debian:jessie
tags:
- socket
variables:
DOCKER_HOST: unix:///var/run/docker.sock
script:
- ./docker-install
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
- docker-compose up -d
# - docker run -dit ${CI_REGISTRY_IMAGE}:${CI_BUILD_TAG} sh
[![build status](https://gitlab.rz.uni-bamberg.de/itfl-service-intern/www-typo3-ci/badges/master/build.svg)](https://gitlab.rz.uni-bamberg.de/itfl-service-public/limesurvey-template/commits/master)
version: '2'
networks:
# for use with a reverse proxy
# proxy:
# external:
# name: proxynet
backend:
driver: bridge
services:
limesurvey:
# build:
# context: ./docker/
# dockerfile: Dockerfile
# image: typo3-ubuntu:dirty
image: docker-registry.rz.uni-bamberg.de/itfl-service-public/limesurvey-template:latest
expose:
- 80
- 443
ports:
- "8080:80"
networks:
- backend
# - proxy
# volumes:
# - ./volumes/var/www:/var/www
# - ./volumes/root/uniba.de/share:/root/uniba.de/share
# - ./volumes/.git:/.git
limesurveydb:
image: mariadb:10.1.19
volumes:
# - database:
- /var/lib/mysql
networks:
- backend
environment:
MYSQL_ROOT_PASSWORD: asdf
MYSQL_DATABASE: asdf
MYSQL_USER: asdf
MYSQL_PASSWORD: asdf
# MYSQL_ALLOW_EMPTY_PASSWORD
# MYSQL_RANDOM_ROOT_PASSWORD
# MYSQL_ONETIME_PASSWORD
FROM php:7.1-apache
MAINTAINER Martin Mai<martin.mai@uni-bamberg.de>
RUN rm /etc/apt/sources.list
ADD sources.list /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y \
graphicsmagick \
libpng12-dev \
libjpeg-dev \
libmcrypt-dev \
libxml2-dev
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mysqli zip mcrypt xml
# Install LimeSurvey
ENV LIMESURVEY_VERSION=2.57.0+161202
RUN apt-get update && apt-get install -y git \
&& git clone --depth 1 --branch ${LIMESURVEY_VERSION} \
https://github.com/LimeSurvey/LimeSurvey.git .
RUN a2enmod headers rewrite expires \
&& a2dismod mpm_event && a2enmod mpm_prefork
#
# See http://help.debian.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://debian.mirror.lrz.de/debian/ jessie main restricted
#deb-src http://debian.mirror.lrz.de/debian/ jessie main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://debian.mirror.lrz.de/debian/ jessie-updates main restricted
#deb-src http://debian.mirror.lrz.de/debian/ jessie-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://debian.mirror.lrz.de/debian/ jessie universe
#deb-src http://debian.mirror.lrz.de/debian/ jessie universe
deb http://debian.mirror.lrz.de/debian/ jessie-updates universe
#deb-src http://debian.mirror.lrz.de/debian/ jessie-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://debian.mirror.lrz.de/debian/ jessie multiverse
#deb-src http://debian.mirror.lrz.de/debian/ jessie multiverse
deb http://debian.mirror.lrz.de/debian/ jessie-updates multiverse
#deb-src http://debian.mirror.lrz.de/debian/ jessie-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://debian.mirror.lrz.de/debian/ jessie-backports main restricted universe multiverse
#deb-src http://debian.mirror.lrz.de/debian/ jessie-backports main restricted universe multiverse
deb http://security.debian.com/debian jessie-security main restricted
#deb-src http://security.debian.com/debian jessie-security main restricted
deb http://security.debian.com/debian jessie-security universe
#deb-src http://security.debian.com/debian jessie-security universe
deb http://security.debian.com/debian jessie-security multiverse
#deb-src http://security.debian.com/debian jessie-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/debian jessie partner
# deb-src http://archive.canonical.com/debian jessie partner
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.debian.com/debian jessie main
# deb-src http://extras.debian.com/debian jessie main
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