Skip to content

Commit

Permalink
Merge pull request #1052 from rughh/chore/update-dev-setup
Browse files Browse the repository at this point in the history
Update the development setup
  • Loading branch information
salzig authored Oct 7, 2024
2 parents f44be63 + 93c7469 commit 14c42d3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
7 changes: 4 additions & 3 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ 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:
<<: *default
database: onruby_test

production:
url: <%= ENV["DATABASE_URL"] %>
url: <%= ENV["DATABASE_URL"] %>
pool: <%= ENV["DB_POOL"] || ENV["MAX_THREADS"] || 5 %>
encoding: utf8
encoding: utf8
23 changes: 7 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14c42d3

Please sign in to comment.