GRN2-164: Switched the default database to Postgres (#952)

* Switched the default database to Postgres

* Uncomment DB variables in sample.env
This commit is contained in:
Ahmad Farhat 2020-02-18 15:22:51 -05:00 committed by GitHub
parent 005c738e4d
commit feccee7d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 20 deletions

View File

@ -13,6 +13,7 @@ tmp
/db/**/*.sqlite3
/db/**/*.sqlite3-journal
/db/production
/db/production-postgres
public/assets
public/b
coverage/

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ vendor/bundle
# Ignore production paths.
/db/production
/db/production-postgres
# Ignore all logfiles and tempfiles.
/log/*

View File

@ -77,6 +77,7 @@ gem 'cancancan', '~> 2.0'
group :production do
# Use a postgres database in production.
gem 'pg', '~> 0.18'
gem 'sequel'
# For a better logging library in production
gem "lograge"

View File

@ -292,6 +292,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
sequel (5.29.0)
shoulda-matchers (3.1.3)
activesupport (>= 4.0.0)
simplecov (0.16.1)
@ -387,6 +388,7 @@ DEPENDENCIES
rspec-rails (~> 3.7)
rubocop
sassc-rails
sequel
shoulda-matchers (~> 3.1)
spring
spring-watcher-listen (~> 2.0.0)

View File

@ -18,19 +18,19 @@ services:
volumes:
- ./log:/usr/src/app/log
# When using sqlite3 as the database
- ./db/production:/usr/src/app/db/production
# - ./db/production:/usr/src/app/db/production
# When using postgresql as the database
# links:
# - db
# db:
# image: postgres:9.5
# restart: on-failure
# ports:
# - 127.0.0.1:5432:5432
# volumes:
# - ./db/production:/var/lib/postgresql/data
# environment:
# - PGHOST=postgres
# - PGDATABASE=postgres
# - PGUSER=postgres
# - PGPASSWORD=password
links:
- db
db:
image: postgres:9.5
restart: on-failure
ports:
- 127.0.0.1:5432:5432
volumes:
- ./db/production:/var/lib/postgresql/data
environment:
- PGHOST=postgres
- PGDATABASE=postgres
- PGUSER=postgres
- PGPASSWORD=password

View File

@ -215,11 +215,11 @@ REPORT_ISSUE_URL=https://github.com/bigbluebutton/greenlight/issues/new
#
# For deployments based on the docker-compose script also included, the HOST should be set with the Docker container id.
#
# DB_ADAPTER=postgresql
# DB_HOST=db
# DB_NAME=greenlight_production
# DB_USERNAME=postgres
# DB_PASSWORD=password
DB_ADAPTER=postgresql
DB_HOST=db
DB_NAME=greenlight_production
DB_USERNAME=postgres
DB_PASSWORD=password
# Specify the default registration to be used by Greenlight until an administrator sets the
# registration method