Created
March 10, 2019 07:29
-
-
Save mpan-wework/55a2de5cb15e846f9607e4dd43e782cb to your computer and use it in GitHub Desktop.
Revisions
-
mpan-wework created this gist
Mar 10, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ # Config Rails to use Postgres and Redis in docker This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ default: &default adapter: postgresql encoding: unicode database: <%= Rails.application.credentials[:pg_database] %> username: <%= Rails.application.credentials[:pg_username] %> password: <%= Rails.application.credentials[:pg_password] %> host: <%= Rails.application.credentials[:pg_host] %> port: <%= Rails.application.credentials[:pg_port] %> pool: 5 development: <<: *default database: my_dev username: pguser password: p@55w0rdpg host: localhost port: 55432 test: <<: *default database: my_test username: pguser password: p@55w0rdpg host: localhost port: 55432 staging: <<: *default production: <<: *default This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ version: '3' services: pg: image: postgres:11.2-alpine ports: - '55432:5432' volumes: - ${HOME}/.docker-volumes/pg-data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=p@55w0rdpg - POSTGRES_USER=pguser redis: image: redis:5.0.3-alpine ports: - '56379:6379' volumes: - ${HOME}/.docker-volumes/redis-data:/data