Compare commits

..

2 Commits

Author SHA1 Message Date
Jack Henschel
ddef75c29c fix tags 2021-11-28 10:57:37 +01:00
Jack Henschel
7ca383e461 [undo] remove other tests 2021-11-28 10:54:26 +01:00
19 changed files with 26 additions and 336 deletions

View File

@@ -1,30 +1,10 @@
name: Publish Latest Container Images name: Publish Latest Container Images
on: on: [push, pull_request]
push:
tags:
- '5.*'
jobs: jobs:
lint_dockerfiles:
name: Lint Dockerfile with hadolint
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile:
- 5.0/apache/Dockerfile
- 5.0/fpm-alpine/Dockerfile
- 5.0/fpm/Dockerfile
steps:
- uses: actions/checkout@v2
- uses: hadolint/hadolint-action@v1.5.0
with:
dockerfile: ${{ matrix.dockerfile }}
ignore: DL4006 DL3008 DL3018
push_images_to_registries: push_images_to_registries:
name: Push Container Images to registries name: Push Container Images to registries
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [lint_dockerfiles]
environment: docker-build environment: docker-build
permissions: permissions:
packages: write packages: write
@@ -52,52 +32,5 @@ jobs:
type=match,pattern=(.+),group=1 type=match,pattern=(.+),group=1
type=match,pattern=^(\d+),group=1 type=match,pattern=^(\d+),group=1
flavor: | flavor: |
latest=true latest=false
suffix=-apache suffix=-apache
- name: 'Build and push latest Apache container images'
uses: docker/build-push-action@v2
with:
context: 5.0/apache
push: true
tags: ${{ steps.metadata-apache.outputs.tags }}
labels: ${{ steps.metadata-apache.outputs.labels }}
- name: 'FPM variant metadata'
id: metadata-fpm
uses: docker/metadata-action@v3
with:
images: |
docker.io/martialblog/limesurvey
tags: |
type=match,pattern=(.+),group=1
type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm
- name: 'Build and push latest fpm container images'
uses: docker/build-push-action@v2
with:
context: 5.0/fpm
push: true
tags: ${{ steps.metadata-fpm.outputs.tags }}
labels: ${{ steps.metadata-fpm.outputs.labels }}
- name: 'FPM Alpine variant metadata'
id: metadata-fpm-alpine
uses: docker/metadata-action@v3
with:
images: |
docker.io/martialblog/limesurvey
tags: |
type=match,pattern=(.+),group=1
type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm-alpine
- name: 'Build and push latest fpm-alpine container images'
uses: docker/build-push-action@v2
with:
context: 5.0/fpm-alpine
push: true
tags: ${{ steps.metadata-fpm-alpine.outputs.tags }}
labels: ${{ steps.metadata-fpm-alpine.outputs.labels }}

View File

@@ -1,103 +0,0 @@
name: Publish LTS Container Images
on:
push:
tags:
- '3.*'
jobs:
lint_dockerfiles:
name: 'Lint Dockerfile with hadolint'
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile:
- 3.0/apache/Dockerfile
- 3.0/fpm-alpine/Dockerfile
- 3.0/fpm/Dockerfile
steps:
- uses: actions/checkout@v2
- uses: hadolint/hadolint-action@v1.5.0
with:
dockerfile: ${{ matrix.dockerfile }}
ignore: DL4006 DL3008 DL3018
push_images_to_registries:
name: 'Push container images to registries'
runs-on: ubuntu-latest
needs: [lint_dockerfiles]
environment: docker-build
permissions:
packages: write
contents: read
steps:
- name: 'Check out the repo'
uses: actions/checkout@v2
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: --debug
- name: 'Log in to DockerHub'
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: 'Apache variant metadata'
id: metadata-apache
uses: docker/metadata-action@v3
with:
images: |
docker.io/martialblog/limesurvey
tags: |
type=match,pattern=(.+),group=1
type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-apache
- name: 'Build and push LTS apache container images'
uses: docker/build-push-action@v2
with:
context: 3.0/apache
push: true
tags: ${{ steps.metadata-apache.outputs.tags }}
labels: ${{ steps.metadata-apache.outputs.labels }}
- name: 'FPM variant metadata'
id: metadata-fpm
uses: docker/metadata-action@v3
with:
images: |
docker.io/martialblog/limesurvey
tags: |
type=match,pattern=(.+),group=1
type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm
- name: 'Build and push LTS fpm container images'
uses: docker/build-push-action@v2
with:
context: 3.0/fpm
push: true
tags: ${{ steps.metadata-fpm.outputs.tags }}
labels: ${{ steps.metadata-apache.outputs.labels }}
- name: 'FPM Alpine variant metadata'
id: metadata-fpm-alpine
uses: docker/metadata-action@v3
with:
images: |
docker.io/martialblog/limesurvey
tags: |
type=match,pattern=(.+),group=1
type=match,pattern=^(\d+),group=1
flavor: |
latest=false
suffix=-fpm-alpine
- name: 'Build and push LTS fpm-alpine container images'
uses: docker/build-push-action@v2
with:
context: 3.0/fpm-alpine
push: true
tags: ${{ steps.metadata-fpm-alpine.outputs.tags }}
labels: ${{ steps.metadata-apache.outputs.labels }}

View File

@@ -1,24 +0,0 @@
---
name: Lint Dockerfile
on: [push, pull_request]
jobs:
lint:
name: Lint Dockerfile with hadolint
strategy:
matrix:
dockerfile:
- 3.0/apache/Dockerfile
- 3.0/fpm-alpine/Dockerfile
- 3.0/fpm/Dockerfile
- 5.0/apache/Dockerfile
- 5.0/fpm-alpine/Dockerfile
- 5.0/fpm/Dockerfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hadolint/hadolint-action@v1.5.0
with:
dockerfile: ${{ matrix.dockerfile }}
ignore: DL4006 DL3008 DL3018

View File

@@ -1,34 +0,0 @@
name: Test Latest Container Images
on: [push, pull_request]
jobs:
test_images:
name: Test Latest Container Images with Trivy
runs-on: ubuntu-latest
strategy:
matrix:
context:
- apache
- fpm-alpine
- fpm
steps:
- name: 'Check out the repo'
uses: actions/checkout@v2
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v1
- name: 'Build Container images'
uses: docker/build-push-action@v2
with:
context: 5.0/${{ matrix.context }}
push: false
load: true
tags: docker.io/martialblog/limesurvey:5-${{ matrix.context }}
- name: 'Run Structure tests'
uses: plexsystems/container-structure-test-action@v0.2.0
with:
image: docker.io/martialblog/limesurvey:5-${{ matrix.context }}
config: tests/${{ matrix.context }}-tests.yaml

View File

@@ -1,34 +0,0 @@
name: Test LTS Container Images
on: [push, pull_request]
jobs:
test_images:
name: Test LTS Container Images with Trivy
runs-on: ubuntu-latest
strategy:
matrix:
context:
- apache
- fpm-alpine
- fpm
steps:
- name: 'Check out the repo'
uses: actions/checkout@v2
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v1
- name: 'Build Container images'
uses: docker/build-push-action@v2
with:
context: 3.0/${{ matrix.context }}
push: false
load: true
tags: docker.io/martialblog/limesurvey:3-${{ matrix.context }}
- name: 'Run Structure tests'
uses: plexsystems/container-structure-test-action@v0.2.0
with:
image: docker.io/martialblog/limesurvey:3-${{ matrix.context }}
config: tests/${{ matrix.context }}-tests.yaml

View File

@@ -1,7 +1,7 @@
FROM php:8.0-apache FROM php:7.4-apache
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='3.28.6+220412' ARG version='3.27.25+211116'
ARG sha256_checksum='d6e928deb77935ca57ef6ee670c52d33e4b4d530534b2810d40b2c4f0f456bf2' ARG sha256_checksum='91ecfecffc3a437dbb14dec19054d64f07849fe1de00a1322699bd1f50185582'
ARG USER=root ARG USER=root
ARG LISTEN_PORT=80 ARG LISTEN_PORT=80

View File

@@ -1,7 +1,7 @@
FROM php:8.0-fpm-alpine FROM php:7.4-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='3.28.6+220412' ARG version='3.27.25+211116'
ARG sha256_checksum='d6e928deb77935ca57ef6ee670c52d33e4b4d530534b2810d40b2c4f0f456bf2' ARG sha256_checksum='91ecfecffc3a437dbb14dec19054d64f07849fe1de00a1322699bd1f50185582'
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \

View File

@@ -1,7 +1,7 @@
FROM php:8.0-fpm FROM php:7.4-fpm
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='3.28.6+220412' ARG version='3.27.25+211116'
ARG sha256_checksum='d6e928deb77935ca57ef6ee670c52d33e4b4d530534b2810d40b2c4f0f456bf2' ARG sha256_checksum='91ecfecffc3a437dbb14dec19054d64f07849fe1de00a1322699bd1f50185582'
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \

View File

@@ -1,4 +1,4 @@
FROM php:8.0-apache FROM php:7.4-apache
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='4.6.3+210518' ARG version='4.6.3+210518'
ARG sha256_checksum='3c59afc13d0cf974c465c5f851cb8837117518e94031f5e3a28ba468ad734ce2' ARG sha256_checksum='3c59afc13d0cf974c465c5f851cb8837117518e94031f5e3a28ba468ad734ce2'

View File

@@ -1,4 +1,4 @@
FROM php:8.0-fpm-alpine FROM php:7.4-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='4.6.3+210518' ARG version='4.6.3+210518'
ARG sha256_checksum='3c59afc13d0cf974c465c5f851cb8837117518e94031f5e3a28ba468ad734ce2' ARG sha256_checksum='3c59afc13d0cf974c465c5f851cb8837117518e94031f5e3a28ba468ad734ce2'

View File

@@ -1,4 +1,4 @@
FROM php:8.0-fpm FROM php:7.4-fpm
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='4.6.3+210518' ARG version='4.6.3+210518'
ARG sha256_checksum='3c59afc13d0cf974c465c5f851cb8837117518e94031f5e3a28ba468ad734ce2' ARG sha256_checksum='3c59afc13d0cf974c465c5f851cb8837117518e94031f5e3a28ba468ad734ce2'

View File

@@ -1,7 +1,7 @@
FROM php:8.0-apache FROM php:8-apache
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='5.3.8+220404' ARG version='5.2.2+211115'
ARG sha256_checksum='ee101a27fe27cca89fad2dc9a4474e09cc98d5a0d21c2457264607f820119050' ARG sha256_checksum='61148c6131ea99a699d95117d1b53f1ba7971c609c93353e7b6221dd13515659'
ARG USER=www-data ARG USER=www-data
ARG LISTEN_PORT=8080 ARG LISTEN_PORT=8080

View File

@@ -1,7 +1,7 @@
FROM php:8.0-fpm-alpine FROM php:8-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='5.3.8+220404' ARG version='5.2.2+211115'
ARG sha256_checksum='ee101a27fe27cca89fad2dc9a4474e09cc98d5a0d21c2457264607f820119050' ARG sha256_checksum='61148c6131ea99a699d95117d1b53f1ba7971c609c93353e7b6221dd13515659'
ARG USER=www-data ARG USER=www-data
# Install OS dependencies # Install OS dependencies

View File

@@ -1,7 +1,7 @@
FROM php:8.0-fpm FROM php:8-fpm
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='5.3.8+220404' ARG version='5.2.2+211115'
ARG sha256_checksum='ee101a27fe27cca89fad2dc9a4474e09cc98d5a0d21c2457264607f820119050' ARG sha256_checksum='61148c6131ea99a699d95117d1b53f1ba7971c609c93353e7b6221dd13515659'
ARG USER=www-data ARG USER=www-data
# Install OS dependencies # Install OS dependencies

View File

@@ -159,7 +159,7 @@ if [ $PHP_UPDATEDB_EXIT_CODE -eq 0 ]; then
else else
echo '' echo ''
echo 'Running console.php install' echo 'Running console.php install'
php application/commands/console.php install "$ADMIN_USER" "$ADMIN_PASSWORD" "$ADMIN_NAME" "$ADMIN_EMAIL" php application/commands/console.php install "$ADMIN_USER" "$ADMIN_PASSWORD" "$ADMIN_NAME $ADMIN_EMAIL"
fi fi
exec "$@" exec "$@"

View File

@@ -87,8 +87,6 @@ For further details on the settings see: https://manual.limesurvey.org/Data_encr
## Traefik example ## Traefik example
**Hint**: if you want to deploy LimeSurvey on a sub-path (e.g. https://example.com/limesurvey) you have to set the BASE_URL and adjust the Containers Webservers. See the docker-compose Traefik example in the repository.
``` ```
# BASE_URL = /limesurvey # BASE_URL = /limesurvey
"traefik.http.routers.limesurvey.rule=PathPrefix(`/limesurvey`)", "traefik.http.routers.limesurvey.rule=PathPrefix(`/limesurvey`)",

View File

@@ -24,7 +24,7 @@ services:
lime-db: lime-db:
image: postgres:10 image: postgres:10
volumes: volumes:
- db-data:/var/lib/postgresql/data - db-data:/var/lib/postgresql
environment: environment:
- "POSTGRES_USER=limesurvey" - "POSTGRES_USER=limesurvey"
- "POSTGRES_DB=limesurvey" - "POSTGRES_DB=limesurvey"

View File

@@ -1,46 +0,0 @@
version: "3.0"
services:
limesurvey:
build:
context: 5.0/apache/
dockerfile: Dockerfile
labels:
traefik.enable: 'true'
traefik.http.routers.limesurvey-http-router.entrypoints: "http"
traefik.http.routers.limesurvey-http-router.rule: "PathPrefix(`/limesurvey`)"
traefik.http.services.limesurvey-service.loadbalancer.server.port: "8080"
links:
- lime-db
depends_on:
- lime-db
volumes:
# Unfortunately the StripPrefix Function in Traefik won't work;
# Meaning, we will have to set 'Alias /limesurvey "/var/www/html"' in the Apache Config
- "./examples/apache-example.conf:/etc/apache2/sites-available/000-default.conf:ro"
environment:
- "DB_HOST=lime-db"
- "DB_PASSWORD=secret"
- "ADMIN_PASSWORD=foobar"
- "PUBLIC_URL=http://localhost:8888/limesurvey"
- "BASE_URL=http://localhost:8888/limesurvey"
traefik:
image: "traefik:v2.5"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:8888"
ports:
- "8888:8888"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
lime-db:
image: mysql:5.7
environment:
- "MYSQL_USER=limesurvey"
- "MYSQL_DATABASE=limesurvey"
- "MYSQL_PASSWORD=secret"
- "MYSQL_ROOT_PASSWORD=secret"

View File

@@ -1,7 +1,7 @@
<VirtualHost *:8080> <VirtualHost *:8080>
ServerAdmin foo@bar.com ServerAdmin foo@bar.com
DocumentRoot /var/www/html DocumentRoot /var/www/html
Alias /limesurvey "/var/www/html" Alias /lime "/var/www/html"
<Directory /> <Directory />
Options FollowSymLinks Options FollowSymLinks