mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-04-28 01:26:58 +00:00
Test db containers no longer use bind mounts and are ephemeral
This commit is contained in:
parent
a019965f6b
commit
fb1189d05b
2 changed files with 3 additions and 8 deletions
|
@ -6,8 +6,6 @@ services:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
volumes:
|
|
||||||
- ./redis:/data
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "redis-cli ping"
|
test: "redis-cli ping"
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
@ -20,8 +18,6 @@ services:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
env_file:
|
env_file:
|
||||||
- .config/docker.env
|
- .config/docker.env
|
||||||
volumes:
|
|
||||||
- ./db:/var/lib/postgresql/data
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"
|
test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "This script will destroy the following local directories:"
|
echo "During testing, your local postgres and redis databases will not be touched."
|
||||||
|
echo "This script will remove the build directories in the following locations:"
|
||||||
echo " ./built"
|
echo " ./built"
|
||||||
echo " ./db"
|
|
||||||
echo " ./redis"
|
|
||||||
echo
|
echo
|
||||||
echo "Do you want to continue? [Y/n]"
|
echo "Do you want to continue? [Y/n]"
|
||||||
read -p "> " confirmation
|
read -p "> " confirmation
|
||||||
|
@ -29,7 +28,7 @@ docker compose rm
|
||||||
|
|
||||||
echo Removing any preexisting builds and databases.
|
echo Removing any preexisting builds and databases.
|
||||||
echo This may take a few moments...
|
echo This may take a few moments...
|
||||||
rm -rf ./built ./db ./redis
|
rm -rf ./built
|
||||||
|
|
||||||
echo Creating environment
|
echo Creating environment
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
Loading…
Add table
Reference in a new issue