Compare commits

...

14 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
Markus Opolka
19a387488a Move entrypoint to /usr/local/bin (#104)
* Move entrypoint to /usr/local/bin

 - so that it's not served by the webserver
2021-11-25 07:56:11 +01:00
Markus Opolka
19a1a0d044 Extend example nginx.conf to include more protected paths (#103) 2021-11-25 07:55:47 +01:00
Mark
624a17b9fc Add depends_on for nginx so it waits until the limesurvey app is ready (#102)
By adding a depends_on in lime-web, it will wait for the limesurvey app to be ready to accept connections.
2021-11-24 09:30:51 +01:00
Markus Opolka
21bc2e44a5 Upgrading to Version 5.2.2+211115 2021-11-23 08:05:51 +01:00
Markus Opolka
644d144f08 Upgrading to LTS Version 3.27.25+211116 2021-11-23 08:04:56 +01:00
Markus Opolka
21d3ffceff Upgrading to Version 5.2.1+211111 2021-11-17 18:38:29 +01:00
Markus Opolka
18f6a97ed3 Upgrading to LTS Version 3.27.24+211108 2021-11-17 18:37:20 +01:00
Markus Opolka
5d9c116b64 Upgrading to Version 5.2.0+211110 2021-11-12 08:04:59 +01:00
Markus Opolka
4b02c3c26d Upgrading to LTS Version 3.27.23+211102 2021-11-12 08:03:42 +01:00
Markus Opolka
1676677dfc Update entrypoint to enable an empty table prefix (#100)
Update entrypoint to enable an empty table prefix

 - Who are we to dictate a table prefix
 - Makes it easier to migrate existing databases that don't have a prefix
2021-11-08 20:38:35 +01:00
Markus Opolka
681f421d6f Upgrading to Version 5.1.17+211025 2021-11-04 07:58:35 +01:00
Markus Opolka
baab608bd9 Upgrading to LTS Version 3.27.22+211026 2021-11-04 07:57:54 +01:00
23 changed files with 42 additions and 286 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
@@ -49,48 +29,8 @@ jobs:
images: | images: |
docker.io/martialblog/limesurvey docker.io/martialblog/limesurvey
tags: | tags: |
type=semver,pattern={{raw}},suffix=-apache type=match,pattern=(.+),group=1
type=semver,pattern={{major}},suffix=-apache type=match,pattern=^(\d+),group=1
flavor: | flavor: |
latest=false latest=false
- name: 'Build and push latest Apache container images' suffix=-apache
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=semver,pattern={{version}},suffix=-fpm
type=semver,pattern={{major}},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=semver,pattern={{version}},suffix=-fpm-alpine
type=semver,pattern={{major}},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,96 +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=semver,pattern={{raw}},suffix=-apache
type=semver,pattern={{major}},suffix=-apache
flavor: |
latest=false
- 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=semver,pattern={{version}},suffix=-fpm
type=semver,pattern={{major}},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=semver,pattern={{version}},suffix=-fpm-alpine
type=semver,pattern={{major}},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:7.4-apache FROM php:7.4-apache
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='3.27.21+211021' ARG version='3.27.25+211116'
ARG sha256_checksum='c54bbc4116b595485f4292c0d0b218049f36b579deffae2a192e350cbe4170b6' ARG sha256_checksum='91ecfecffc3a437dbb14dec19054d64f07849fe1de00a1322699bd1f50185582'
ARG USER=root ARG USER=root
ARG LISTEN_PORT=80 ARG LISTEN_PORT=80
@@ -75,8 +75,8 @@ RUN set -ex; \
chown -R www-data:www-data /var/www/html /etc/apache2 chown -R www-data:www-data /var/www/html /etc/apache2
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"] CMD ["apache2-foreground"]

View File

@@ -89,7 +89,7 @@ return array(
'username' => '$DB_USERNAME', 'username' => '$DB_USERNAME',
'password' => '$DB_PASSWORD', 'password' => '$DB_PASSWORD',
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '${DB_TABLE_PREFIX//[[:space:]]/}',
), ),
//'session' => array ( //'session' => array (
// 'class' => 'application.core.web.DbHttpSession', // 'class' => 'application.core.web.DbHttpSession',

View File

@@ -1,7 +1,7 @@
FROM php:7.4-fpm-alpine FROM php:7.4-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='3.27.21+211021' ARG version='3.27.25+211116'
ARG sha256_checksum='c54bbc4116b595485f4292c0d0b218049f36b579deffae2a192e350cbe4170b6' ARG sha256_checksum='91ecfecffc3a437dbb14dec19054d64f07849fe1de00a1322699bd1f50185582'
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
@@ -52,6 +52,6 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -82,7 +82,7 @@ return array(
'username' => '$DB_USERNAME', 'username' => '$DB_USERNAME',
'password' => '$DB_PASSWORD', 'password' => '$DB_PASSWORD',
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '${DB_TABLE_PREFIX//[[:space:]]/}',
), ),
//'session' => array ( //'session' => array (
// 'class' => 'application.core.web.DbHttpSession', // 'class' => 'application.core.web.DbHttpSession',

View File

@@ -1,7 +1,7 @@
FROM php:7.4-fpm FROM php:7.4-fpm
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='3.27.21+211021' ARG version='3.27.25+211116'
ARG sha256_checksum='c54bbc4116b595485f4292c0d0b218049f36b579deffae2a192e350cbe4170b6' ARG sha256_checksum='91ecfecffc3a437dbb14dec19054d64f07849fe1de00a1322699bd1f50185582'
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
@@ -62,6 +62,6 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -82,7 +82,7 @@ return array(
'username' => '$DB_USERNAME', 'username' => '$DB_USERNAME',
'password' => '$DB_PASSWORD', 'password' => '$DB_PASSWORD',
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '${DB_TABLE_PREFIX//[[:space:]]/}',
), ),
//'session' => array ( //'session' => array (
// 'class' => 'application.core.web.DbHttpSession', // 'class' => 'application.core.web.DbHttpSession',

View File

@@ -1,7 +1,7 @@
FROM php:8-apache FROM php:8-apache
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='5.1.16+211020' ARG version='5.2.2+211115'
ARG sha256_checksum='4cd8764f4698717c5f6c4d2b85372047871a47cb1171a053b13d6ff5a9346132' ARG sha256_checksum='61148c6131ea99a699d95117d1b53f1ba7971c609c93353e7b6221dd13515659'
ARG USER=www-data ARG USER=www-data
ARG LISTEN_PORT=8080 ARG LISTEN_PORT=8080
@@ -78,8 +78,8 @@ RUN set -ex; \
EXPOSE $LISTEN_PORT EXPOSE $LISTEN_PORT
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"] CMD ["apache2-foreground"]

View File

@@ -96,7 +96,7 @@ return array(
'username' => '$DB_USERNAME', 'username' => '$DB_USERNAME',
'password' => '$DB_PASSWORD', 'password' => '$DB_PASSWORD',
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '${DB_TABLE_PREFIX//[[:space:]]/}',
), ),
//'session' => array ( //'session' => array (
// 'class' => 'application.core.web.DbHttpSession', // 'class' => 'application.core.web.DbHttpSession',

View File

@@ -1,7 +1,7 @@
FROM php:8-fpm-alpine FROM php:8-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='5.1.16+211020' ARG version='5.2.2+211115'
ARG sha256_checksum='4cd8764f4698717c5f6c4d2b85372047871a47cb1171a053b13d6ff5a9346132' ARG sha256_checksum='61148c6131ea99a699d95117d1b53f1ba7971c609c93353e7b6221dd13515659'
ARG USER=www-data ARG USER=www-data
# Install OS dependencies # Install OS dependencies
@@ -54,7 +54,7 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -89,7 +89,7 @@ return array(
'username' => '$DB_USERNAME', 'username' => '$DB_USERNAME',
'password' => '$DB_PASSWORD', 'password' => '$DB_PASSWORD',
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '${DB_TABLE_PREFIX//[[:space:]]/}',
), ),
//'session' => array ( //'session' => array (
// 'class' => 'application.core.web.DbHttpSession', // 'class' => 'application.core.web.DbHttpSession',

View File

@@ -1,7 +1,7 @@
FROM php:8-fpm FROM php:8-fpm
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
ARG version='5.1.16+211020' ARG version='5.2.2+211115'
ARG sha256_checksum='4cd8764f4698717c5f6c4d2b85372047871a47cb1171a053b13d6ff5a9346132' ARG sha256_checksum='61148c6131ea99a699d95117d1b53f1ba7971c609c93353e7b6221dd13515659'
ARG USER=www-data ARG USER=www-data
# Install OS dependencies # Install OS dependencies
@@ -63,7 +63,7 @@ RUN set -ex; \
EXPOSE 9000 EXPOSE 9000
WORKDIR /var/www/html WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
USER $USER USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -89,7 +89,7 @@ return array(
'username' => '$DB_USERNAME', 'username' => '$DB_USERNAME',
'password' => '$DB_PASSWORD', 'password' => '$DB_PASSWORD',
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '${DB_TABLE_PREFIX//[[:space:]]/}',
), ),
//'session' => array ( //'session' => array (
// 'class' => 'application.core.web.DbHttpSession', // 'class' => 'application.core.web.DbHttpSession',

View File

@@ -103,7 +103,7 @@ For further details on the settings see: https://manual.limesurvey.org/Data_encr
| DB_PORT | Database server port | | DB_PORT | Database server port |
| DB_SOCK | Database unix socket instead of host/port | | DB_SOCK | Database unix socket instead of host/port |
| DB_NAME | Database name | | DB_NAME | Database name |
| DB_TABLE_PREFIX | Database table prefix | | DB_TABLE_PREFIX | Database table prefix; set this to a single whitespace if you don't want a table prefix. |
| DB_MYSQL_ENGINE | MySQL engine used for survey tables (values: MyISAM, InnoDB, default: MyISAM) | | DB_MYSQL_ENGINE | MySQL engine used for survey tables (values: MyISAM, InnoDB, default: MyISAM) |
| DB_USERNAME | Database user | | DB_USERNAME | Database user |
| DB_PASSWORD | Database user's password | | DB_PASSWORD | Database user's password |

View File

@@ -20,6 +20,8 @@ services:
image: nginx:alpine image: nginx:alpine
links: links:
- limesurvey - limesurvey
depends_on:
- limesurvey
ports: ports:
- "8080:80" - "8080:80"
volumes: volumes:

View File

@@ -17,6 +17,8 @@ services:
- "DB_HOST=lime-db" - "DB_HOST=lime-db"
- "DB_PASSWORD=secret" - "DB_PASSWORD=secret"
- "ADMIN_PASSWORD=foobar" - "ADMIN_PASSWORD=foobar"
# If you require an empty table prefix, use a space as the DB_TABLE_PREFIX
# - "DB_TABLE_PREFIX= "
lime-db: lime-db:
image: mysql:5.7 image: mysql:5.7
environment: environment:

View File

@@ -19,7 +19,7 @@ http {
location / { location / {
try_files $uri /index.php?$args; try_files $uri /index.php?$args;
} }
location ~ ^/(protected|framework|themes/\w+/views) { location ~ ^/(protected|application|framework|themes/\w+/views) {
deny all; deny all;
} }
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {

View File

@@ -9,7 +9,7 @@ fileContentTests:
path: '/var/www/html/admin/index.php' path: '/var/www/html/admin/index.php'
expectedContents: ['LimeSurvey'] expectedContents: ['LimeSurvey']
- name: 'Entrypoint file content' - name: 'Entrypoint file content'
path: '/var/www/html/entrypoint.sh' path: '/usr/local/bin/entrypoint.sh'
expectedContents: ['console.php', 'ADMIN_USER'] expectedContents: ['console.php', 'ADMIN_USER']
fileExistenceTests: fileExistenceTests:

View File

@@ -9,7 +9,7 @@ fileContentTests:
path: '/var/www/html/admin/index.php' path: '/var/www/html/admin/index.php'
expectedContents: ['LimeSurvey'] expectedContents: ['LimeSurvey']
- name: 'Entrypoint file content' - name: 'Entrypoint file content'
path: '/var/www/html/entrypoint.sh' path: '/usr/local/bin/entrypoint.sh'
expectedContents: ['console.php', 'ADMIN_USER'] expectedContents: ['console.php', 'ADMIN_USER']
fileExistenceTests: fileExistenceTests: