Skip to content

Commit

Permalink
Add db-demo recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
phlax committed Apr 11, 2018
1 parent 7f1ddc5 commit a6ca88f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 243 deletions.
10 changes: 10 additions & 0 deletions docker/db-demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# translate/pootle:db-demo
#
# VERSION 0.0.1

# Build stage
FROM postgres:9.4-alpine

ENV POSTGRES_USER=pootle \
POSTGRES_PASSWORD=CHANGEME \
POSTGRES_DB=pootledb
13 changes: 13 additions & 0 deletions docker/demo-postgres/bin/await-postgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

RETRIES=10

POSTGRES_PASSWORD=CHANGEME
PG_HOST=postgres
PG_USER=pootle
PG_DATABASE=pootledb

until psql -h $PG_HOST -U $PG_USER -d $PG_DATABASE -c "select 1" > /dev/null 2>&1 || [ $RETRIES -eq 0 ]; do
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..."
sleep 2
done
37 changes: 0 additions & 37 deletions docker/demo-postgres/bin/build-travis-images

This file was deleted.

149 changes: 0 additions & 149 deletions docker/demo-postgres/bin/run_db

This file was deleted.

57 changes: 0 additions & 57 deletions docker/demo-postgres/bin/run_db_mariadb

This file was deleted.

0 comments on commit a6ca88f

Please sign in to comment.