feat(web/panettone): Add dev helpers for postgres db
Add a docker-compose file and lorri-based direnv for aiding in running and connecting to a postgres database during development of panettone. Change-Id: I319eee52b52cd48e1f3d2e32c558989768dc19d8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1465 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: eta <eta@theta.eu.org>
This commit is contained in:
parent
da8bc7635e
commit
696924b5ef
4 changed files with 28 additions and 0 deletions
1
third_party/default.nix
vendored
1
third_party/default.nix
vendored
|
@ -64,6 +64,7 @@ let
|
|||
dfu-util
|
||||
diffutils
|
||||
dockerTools
|
||||
docker-compose
|
||||
execline
|
||||
fd
|
||||
fetchFromGitHub
|
||||
|
|
1
web/panettone/.envrc
Normal file
1
web/panettone/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
eval "$(lorri direnv)"
|
11
web/panettone/docker-compose.yml
Normal file
11
web/panettone/docker-compose.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
version: '3.4'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:11
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: panettone
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: panettone
|
||||
ports:
|
||||
- 127.0.0.1:5432:5432
|
15
web/panettone/shell.nix
Normal file
15
web/panettone/shell.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ depot ? import ../.. {} }:
|
||||
|
||||
with depot.third_party;
|
||||
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
docker-compose
|
||||
postgresql
|
||||
];
|
||||
|
||||
PGPASSWORD = "password";
|
||||
PGHOST = "localhost";
|
||||
PGUSER = "panettone";
|
||||
PGDATABASE = "panettone";
|
||||
}
|
Loading…
Reference in a new issue