WIP: Include pghero in the local environment #219

Draft
bustikiller wants to merge 5 commits from pghero-docker into main
3 changed files with 23 additions and 5 deletions
Showing only changes of commit 598642a0db - Show all commits

View File

@ -57,16 +57,17 @@ The backend service will seed the database with fake data. It's worth noting tha
The backend, frontend and workers have hot-reloading enabled, so changes made to the codebase should be reflected in the application on the next request.
Once all containers have started, visit http://libre-wedding-planner.app.localhost/default/dashboard to load the application.
Once all containers have started, visit:
- http://libre-wedding-planner.app.localhost/default to load the application.
- http://libre-wedding-planner.app.localhost/letter_opener/ to get a list of emails generated by the application.
- http://pghero.libre-wedding-planner.app.localhost to load the [pghero](https://github.com/ankane/pghero) tool.
## Multitenancy
LibreWeddingPlanner is designed to manage multiple weddings in a single host. All URLs (in the API and the frontend) are scoped under a slug that is unique per wedding. The slug is made of lowercase letters, numbers, and dashes (-).
The development environment is seeded with a wedding whose slug is `default`.
## Email delivery
In the development environment, real emails will not be sent. You can visit http://libre-wedding-planner.app.localhost/letter_opener/ to get a list of emails generated by the application.
## Testing

View File

@ -79,5 +79,13 @@ services:
interval: 10s
timeout: 5s
retries: 5
pghero:
image: ankane/pghero
ports:
- 8080
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
depends_on:
db:
condition: service_healthy

View File

@ -23,3 +23,12 @@ server {
}
}
server {
listen 80;
server_name pghero.libre-wedding-planner.app.localhost;
location / {
proxy_pass http://pghero:8080;
proxy_set_header Host $http_host;
}
}