Browse Source

Add pgadmin to the development environment

pull/1684/head
Robbert Coeckelbergh 3 years ago
parent
commit
94947b1c60
  1. 4
      .env
  2. 5
      README.md
  3. 15
      docker/docker-compose.dev.yml
  4. 51197
      yarn.lock

4
.env

@ -10,6 +10,10 @@ POSTGRES_DB=ghostfolio-db
POSTGRES_USER=user
POSTGRES_PASSWORD=<INSERT_POSTGRES_PASSWORD>
# PGADMIN
PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
PGADMIN_DEFAULT_PASSWORD=admin
ACCESS_TOKEN_SALT=<INSERT_RANDOM_STRING>
ALPHA_VANTAGE_API_KEY=
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?sslmode=prefer

5
README.md

@ -189,6 +189,11 @@ With the following command you can keep your database schema in sync:
yarn database:push
```
### PG Admin
You can use pgadmin to debug the postgres database locally
Open http://localhost:5050 in your browser and login with the credentials set in .env
## Testing
Run `yarn test`

15
docker/docker-compose.dev.yml

@ -11,6 +11,20 @@ services:
volumes:
- postgres:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
restart: unless-stopped
env_file:
- ../.env
ports:
- "${PGADMIN_PORT:-5050}:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- pgadmin-data:/var/lib/pgadmin
redis:
image: 'redis:alpine'
container_name: redis
@ -20,3 +34,4 @@ services:
volumes:
postgres:
pgadmin-data:

51197
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save