From e1fc628202879041f70b2a3408b06d6debd0859e Mon Sep 17 00:00:00 2001 From: jfederico Date: Fri, 24 May 2019 15:53:40 +0000 Subject: [PATCH] Add settings for postgres --- docker-compose.yml | 20 ++++++++++++++++++++ sample.env | 11 ++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4c76ee10..2ba18f2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,11 +9,31 @@ services: restart: unless-stopped ports: - 5000:80 +# When using sqlite3 as the database volumes: - ./db/production:/usr/src/app/db/production - ./log:/usr/src/app/log +# When using external logging # logging: # driver: $LOG_DRIVER # options: # syslog-address: $LOG_ADDRESS # tag: $LOG_TAG + + +# When using postgresql as the database +# links: +# - db +# +# db: +# image: postgres:9.5 +# restart: on-failure +# ports: +# - 5432:5432 +# volumes: +# - database_data:/var/lib/postgresql/data +# environment: +# - PGHOST=postgres +# - PGDATABASE=postgres +# - PGUSER=postgres +# - PGPASSWORD=password diff --git a/sample.env b/sample.env index 037c36fa..b256013b 100644 --- a/sample.env +++ b/sample.env @@ -79,7 +79,7 @@ LDAP_PASSWORD= ALLOW_GREENLIGHT_ACCOUNTS=true # To enable reCaptcha on the user sign up, define these 2 keys -# You can obtain these keys by registering your domain using the following url: +# You can obtain these keys by registering your domain using the following url: # # https://www.google.com/recaptcha/admin # @@ -176,3 +176,12 @@ ENABLE_GOOGLE_CALENDAR_BUTTON= # Force SSL # # ENABLE_SSL=true + +# Database settings +# Greenlight works out of the box with sqlite3, but if postgresql is required, especially for production +# These variables should also be included. +# DB_ADAPTER=postgresql +# DB_HOST=postgres.example.com +# DB_NAME=greenlight_production +# DB_USERNAME=postgres +# DB_PASSWORD=password