starting
This commit is contained in:
parent
8103be3c56
commit
43448cd80b
2 changed files with 59 additions and 0 deletions
30
docker-compose.yml
Normal file
30
docker-compose.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app-db:
|
||||||
|
image: postgres:17
|
||||||
|
container_name: app-db
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: app
|
||||||
|
POSTGRES_PASSWORD: app123
|
||||||
|
POSTGRES_DB: app_db
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
volumes:
|
||||||
|
- app-db-data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
dw-db:
|
||||||
|
image: postgres:17
|
||||||
|
container_name: dw-db
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: dw
|
||||||
|
POSTGRES_PASSWORD: dw123
|
||||||
|
POSTGRES_DB: dw_db
|
||||||
|
ports:
|
||||||
|
- "5433:5432"
|
||||||
|
volumes:
|
||||||
|
- dw-db-data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
app-db-data:
|
||||||
|
dw-db-data:
|
||||||
29
flake.nix
Normal file
29
flake.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
description = "Rust dev env for Meltano toy project";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
in {
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
rustup
|
||||||
|
pkg-config
|
||||||
|
openssl
|
||||||
|
postgresql
|
||||||
|
sqlx-cli
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export DATABASE_URL=postgres://app:app123@localhost:5432/app_db
|
||||||
|
echo "✅ Rust + PostgreSQL dev env ready"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue