Skip to content

Commit

Permalink
Merge pull request #816 from zmariscal/feature--add-postgresql
Browse files Browse the repository at this point in the history
Feature:  add postgresql to Docker and docker compose file
  • Loading branch information
jkowens authored Sep 6, 2023
2 parents 02838d1 + 85cbdea commit 08a76fb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /usr/src/app

# Install system packages
RUN apt-get update -qq && \
apt-get install -y default-mysql-client vim && \
apt-get install -y default-mysql-client postgresql postgresql-contrib vim && \
apt-get clean

# Set environment variables
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ services:
ports:
- "3306:3306"

postgresql:
image: postgres:latest
volumes:
- postgresql-data:/var/lib/postgresql/data
ports:
- "5432:5432"

app:
build:
context: .
Expand All @@ -19,7 +26,9 @@ services:
- .:/usr/src/app
depends_on:
- mysql
- postgresql
command: tail -f /dev/null

volumes:
mysql-data:
postgresql-data:
1 change: 1 addition & 0 deletions test/database.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ postgresql: &postgresql
<<: *common
username: postgres
adapter: postgresql
host: postgresql
min_messages: warning

postresql_makara:
Expand Down
2 changes: 1 addition & 1 deletion test/support/shared_examples/recursive_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def should_support_recursive_import
end

books.each do |book|
assert_equal book.topic_id, nil
assert_nil book.topic_id, nil
end
end

Expand Down

0 comments on commit 08a76fb

Please sign in to comment.