Skip to content

Commit 08e1025

Browse files
author
Robert Quander
committed
delete the db before trything the chcker. Should work now?
1 parent a06cdd8 commit 08e1025

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

service/docker-compose.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ services:
1616
- postgres_data:/var/lib/postgresql/data
1717
# If things really need to be wiped, uncomment the destructive entrypoint below.
1818
# This will remove all old data in the database, and rebuild it from scratch.
19-
#entrypoint: [ "bash", "-c", "\
20-
# echo 'WIPING OLD POSTGRES DATA...'; \
21-
# rm -rf /var/lib/postgresql/data/*; \
22-
# exec docker-entrypoint.sh postgres \
23-
# " ]
19+
entrypoint: [ "bash", "-c", "\
20+
if [ ! -f /var/lib/postgresql/data/PG_VERSION ]; then \
21+
echo 'Database seems uninitialized. WIPING AND REBUILDING...'; \
22+
rm -rf /var/lib/postgresql/data/*; \
23+
fi; \
24+
exec docker-entrypoint.sh postgres " ]
2425
healthcheck:
2526
test: ["CMD-SHELL", "pg_isready -U postgres"]
2627
interval: 30s

0 commit comments

Comments
 (0)