diff --git a/config/database.yml b/config/database.yml index 1b008559..2130809a 100644 --- a/config/database.yml +++ b/config/database.yml @@ -4,7 +4,8 @@ development: &default min_messages: WARNING pool: 5 username: postgres - host: <%= ENV["POSTGRES_PORT_5432_TCP_ADDR"] || 'localhost' %> + password: <%= ENV["POSTGRES_PASSWORD"] || "INSECURE_LOCAL_DEVELOPMENT_PASSWORD" %> + host: <%= ENV["POSTGRES_PORT_5432_TCP_ADDR"] || '127.0.0.1' %> port: <%= ENV["POSTGRES_PORT_5432_TCP_PORT"] || 5432 %> test: @@ -12,6 +13,6 @@ test: database: onruby_test production: - url: <%= ENV["DATABASE_URL"] %> + url: <%= ENV["DATABASE_URL"] %> pool: <%= ENV["DB_POOL"] || ENV["MAX_THREADS"] || 5 %> - encoding: utf8 + encoding: utf8 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 796b25e2..9faac297 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,7 @@ -postgres: - image: postgres:9.4.1 -box: - image: busybox - volumes: - - /box -web: - build: . - ports: - - "3000:3000" - links: - - postgres - volumes: - - .:/app - volumes_from: - - box +services: + postgres: + image: postgres:14.12 + ports: + - "5432:5432" + environment: + POSTGRES_PASSWORD: INSECURE_LOCAL_DEVELOPMENT_PASSWORD \ No newline at end of file diff --git a/readme.md b/readme.md index 5867e44a..c4565693 100644 --- a/readme.md +++ b/readme.md @@ -91,6 +91,15 @@ This will list links and logos to all the usergroups. ### Install locally +### On a Docker Container + +```sh +docker-compose up postgres -d + +./bin/setup +./bin/rails server +``` + ### On your machine #### Install PostgreSQL