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
/db/**/*.sqlite3-journal /db/**/*.sqlite3-journal
/db/production /db/production
/db/production-postgres
public/assets public/assets
public/b public/b
coverage/ coverage/

1
.gitignore vendored
View File

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

View File

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

View File

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

View File

@ -18,19 +18,19 @@ services:
volumes: volumes:
- ./log:/usr/src/app/log - ./log:/usr/src/app/log
# When using sqlite3 as the database # 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 # When using postgresql as the database
# links: links:
# - db - db
# db: db:
# image: postgres:9.5 image: postgres:9.5
# restart: on-failure restart: on-failure
# ports: ports:
# - 127.0.0.1:5432:5432 - 127.0.0.1:5432:5432
# volumes: volumes:
# - ./db/production:/var/lib/postgresql/data - ./db/production:/var/lib/postgresql/data
# environment: environment:
# - PGHOST=postgres - PGHOST=postgres
# - PGDATABASE=postgres - PGDATABASE=postgres
# - PGUSER=postgres - PGUSER=postgres
# - PGPASSWORD=password - 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. # For deployments based on the docker-compose script also included, the HOST should be set with the Docker container id.
# #
# DB_ADAPTER=postgresql DB_ADAPTER=postgresql
# DB_HOST=db DB_HOST=db
# DB_NAME=greenlight_production DB_NAME=greenlight_production
# DB_USERNAME=postgres DB_USERNAME=postgres
# DB_PASSWORD=password DB_PASSWORD=password
# Specify the default registration to be used by Greenlight until an administrator sets the # Specify the default registration to be used by Greenlight until an administrator sets the
# registration method # registration method