From cecca790c61e67ba4b32ebbfe80d595c09a5fef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leandro=20Martins=20Guimar=C3=A3es?= Date: Mon, 1 Jul 2024 23:06:24 -0300 Subject: [PATCH] Adding pgAdmin --- docker-compose.yaml | 10 ++++++++++ readme.md | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index b45e317..f36e222 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -27,5 +27,15 @@ services: POSTGRES_USER: root POSTGRES_HOST_AUTH_METHOD: trust + pgadmin: + image: dpage/pgadmin4:8.9 + ports: + - 8080:80 + environment: + PGADMIN_DEFAULT_EMAIL: "root@email.com" + PGADMIN_DEFAULT_PASSWORD: "password" + depends_on: + - postgres + redis: image: redis:7.2-alpine diff --git a/readme.md b/readme.md index 42bd3ab..bf1ff31 100644 --- a/readme.md +++ b/readme.md @@ -17,6 +17,7 @@ Any Extensions will also run in the same container, meaning that intellisense wi - `php:8.3-fpm-alpine` container with pgsql and redis extensions. - `nginx:1.27-alpine` preconfigured for your Laravel application. - `postgres:16.3-alpine` preconfigured with the default Laravel credentials. +- `pgadmin4:8.9` container with pgAdmin. - `redis:7.2-alpine` for caching, queues, sessions, etc. #### Easy Installation @@ -60,6 +61,10 @@ You may then navigate to [`localhost`](http://localhost) on your local machine. Run any artisan or composer commands using the Visual Studio Code [Integrated Terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). As such, you do not need anything else installed on your host machine! +#### pgAdmin + +[`pgAdmin`](https://www.pgadmin.org/) can be accessed via [`localhost:8080`](http://localhost:8080). After signing in with the credentials defined in `docker-compose.yaml`, to connect to your Postgres container, set the "Host name/address" as `postgres`, and the "Username" as `root`. There is no need to set a password, as the Postgres container is running as `POSTGRES_HOST_AUTH_METHOD: trust`. + #### Extensions `laravel-devcontainer` currently ships with the following extensions for Laravel development in Visual Studio Code: