-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelper.sh
More file actions
executable file
·35 lines (26 loc) · 1.11 KB
/
helper.sh
File metadata and controls
executable file
·35 lines (26 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Do not use. Use scripts in fetch-local
# This may change to fit devops needs (e.g kubectl)
# This will also not build on local podman network
build-inventory-db () {
podman stop inventory-database;
podman container rm -f inventory-database;
(cd inventory && podman build --file images/inventory.db.local.Containerfile --tag inventory-postgres-image .);
podman run -d --name inventory-database -p 5432:5432 \
-v inventory_service_data:/var/lib/postgresql/data \
inventory-postgres-image
}
# Do not use. Use scripts in fetch-local
# This may change to fit devops needs (e.g. kubectl)
# This will also not build on local podman network
wipe-inventory-db () {
podman stop inventory-database;
# podman container rm -f inventory-database;
# removes both container and volume
podman rm -v [inventory-database];
(cd inventory && podman build --file images/inventory.db.local.Containerfile --tag inventory-postgres-image .);
podman run -d --name inventory-database -p 5432:5432 \
-v inventory_service_data:/var/lib/postgresql/data \
inventory-postgres-image
}
"$@"