mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
Add example docker-compose.yaml for Postgres
This commit is contained in:
@@ -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 |
|
||||
|
||||
@@ -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
26
docker-compose.pgsql.yml
Normal 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"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user