Skip to content

Commit 15ffd14

Browse files
committed
Update docker volume for test DB
1 parent 2d76c8b commit 15ffd14

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,7 @@ trapdata.ini
134134
<tempfile.*
135135

136136
# macOS
137+
.DS_Store
137138

138-
.DS_Store
139+
# Docker volumes
140+
db_data/

scripts/start_db_container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ HOST_PORT=5432
88
POSTGRES_VERSION=14
99
POSTGRES_DB=ami
1010

11-
docker run -d -i --name $CONTAINER_NAME -p $HOST_PORT:5432 -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=$POSTGRES_DB postgres:$POSTGRES_VERSION
11+
docker run -d -i --name $CONTAINER_NAME -v "$(pwd)/db_data":/var/lib/postgresql/data --restart always -p $HOST_PORT:5432 -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=$POSTGRES_DB postgres:$POSTGRES_VERSION
1212

1313
docker logs ami-db --tail 100
1414

0 commit comments

Comments
 (0)