Skip to content

Commit

Permalink
Merge pull request #171 from voxpupuli/docs7
Browse files Browse the repository at this point in the history
Cleanup dev/prod database setup
  • Loading branch information
bastelfreak authored May 7, 2020
2 parents bb09658 + 0516439 commit 4e34f2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
15 changes: 6 additions & 9 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,24 @@
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000

development:
adapter: postgresql
encoding: unicode
database: vpt
pool: 5
username: vpt
password: vptpgpassword
port: 5432
host: localhost
port: 5555

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
# Do not use the same db as development or production.
test:
<<: *default
database: db/test.sqlite3

development:
<<: *default

production:
<<: *default
database: db/production.sqlite3
host: postgres
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ services:
container_name: vpt-redis
volumes:
- ./redis:/data
ports:
- 127.0.0.1:6379:6379
web:
restart: always
image: voxpupuli/vox-pupuli-tasks
Expand Down Expand Up @@ -52,4 +54,5 @@ services:
POSTGRES_USER: vpt
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./db/production.sqlite3:/vpt/db/production.sqlite3
ports:
- 127.0.0.1:5432:5432

0 comments on commit 4e34f2f

Please sign in to comment.