Skip to content

Commit

Permalink
Add PgAdmin4
Browse files Browse the repository at this point in the history
  • Loading branch information
the-teacher committed Oct 3, 2023
1 parent 5b7fcd0 commit e1030d5
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
/db/ELASTIC
!/db/ELASTIC/.keep

/db/PGADMIN
!/db/PGADMIN/.keep

/shared
!/shared/.keep

Expand Down
7 changes: 7 additions & 0 deletions Rails7StartKit/bin/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def setup!
docker_compose('up elastic -d')
wait('to launch ElasticSearch Container')

# PgAdmin4
if development?
step_info 'Launching PgAdmin Container'
docker_compose('up pgadmin -d')
wait('to launch PgAdmin Container')
end

step_info 'Correcting Permissions for Linux'
set_lucky_permissions

Expand Down
15 changes: 15 additions & 0 deletions Rails7StartKit/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,25 @@ services:
environment:
POSTGRES_PASSWORD: qwerty
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- 5432:5432
volumes:
- ../../db/PGSQL:/var/lib/postgresql/data/pgdata
- ../../shared:/shared

# port: 5050:80
#
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: qwerty
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- 5050:80
volumes:
- ../../db/PGADMIN:/var/lib/pgadmin

# port: 6379
#
# run with dumping db every 60 secs:
Expand Down
4 changes: 4 additions & 0 deletions app/views/demo/_services.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
<li>
<%= link_to "ElasticSearch", "http://localhost:9200", class: 'dropdown-item', target: :_blank %>
</li>
<li><hr class="dropdown-divider"></li>
<li>
<%= link_to "PgAdmin4", "http://localhost:5050", class: 'dropdown-item', target: :_blank %>
</li>
</ul>
</li>
Empty file added db/PGADMIN/.keep
Empty file.
Binary file removed db/PGADMIN/pgadmin4.db
Binary file not shown.
Binary file not shown.

0 comments on commit e1030d5

Please sign in to comment.