Add example docker-compose.yaml for Postgres

This commit is contained in:
Markus Opolka
2018-08-08 09:41:34 +02:00
parent bef4ac9ae3
commit 2683fcee3c
4 changed files with 29 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ To change to LimeSurvey configuration, you can mount a Volume into the Container
| Parameter | Description |
| --------- | ----------- |
| DB_TYPE | Database Type to use. mysql or postgresql |
| DB_TYPE | Database Type to use. mysql or pgsql |
| DB_HOST | Database server hostname |
| DB_PORT | Database server port |
| DB_NAME | Database name |

View File

@@ -39,7 +39,7 @@ else
cp application/config/config-sample-mysql.php application/config/config.php
fi
if [ "$DB_TYPE" = 'postgresql' ]; then
if [ "$DB_TYPE" = 'pgsql' ]; then
echo 'Info: Using PostgreSQL configuration'
DB_CHARSET=${DB_CHARSET:-'utf8'}
cp application/config/config-sample-pgsql.php application/config/config.php

26
docker-compose.pgsql.yml Normal file
View File

@@ -0,0 +1,26 @@
version: "3.0"
services:
limesurvey:
build:
context: apache/
dockerfile: Dockerfile
volumes:
- /tmp/upload/:/var/www/html/upload/
links:
- lime-db
depends_on:
- lime-db
ports:
- "8080:80"
environment:
- "DB_TYPE=pgsql"
- "DB_PORT=5432"
- "DB_HOST=docker-limesurvey_lime-db_1"
- "DB_PASSWORD=secret"
- "ADMIN_PASSWORD=foobar"
lime-db:
image: postgres:10
environment:
- "POSTGRES_USER=limesurvey"
- "POSTGRES_DB=limesurvey"
- "POSTGRES_PASSWORD=secret"

View File

@@ -39,7 +39,7 @@ else
cp application/config/config-sample-mysql.php application/config/config.php
fi
if [ "$DB_TYPE" = 'postgresql' ]; then
if [ "$DB_TYPE" = 'pgsql' ]; then
echo 'Info: Using PostgreSQL configuration'
DB_CHARSET=${DB_CHARSET:-'utf8'}
cp application/config/config-sample-pgsql.php application/config/config.php