Skip to content

Commit

Permalink
chore: add custom entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 25, 2020
1 parent b16a800 commit d4349ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
22 changes: 3 additions & 19 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ services:
test: psql postgres --command "select 1" -U postgres
ports:
- "5432:5432"
# volumes:
# - postgres-volume:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres

pact-broker:
# image: pactfoundation/pact-broker
build: .
ports:
- "9393:9393"
Expand All @@ -32,20 +29,7 @@ services:
# PACT_BROKER_PORT: "9292"
PORT: '9393'
PACT_BROKER_LOG_LEVEL: INFO
PACT_BROKER_SQL_LOG_LEVEL: DEBUG

# Nginx is not necessary, but demonstrates how
# one might use a reverse proxy in front of the broker,
# and includes the use of a self-signed TLS certificate
nginx:
image: nginx:alpine
depends_on:
- pact-broker
PACT_BROKER_SQL_LOG_LEVEL: INFO
entrypoint: /custom-entrypoint.sh
volumes:
- ./ssl/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./ssl:/etc/nginx/ssl
ports:
- "8443:443"
- "80:80"
volumes:
postgres-volume:
- ./script/docker/docker-compose-entrypoint.sh:/custom-entrypoint.sh
5 changes: 5 additions & 0 deletions script/docker/docker-compose-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

echo "Sleeping 5 seconds to ensure the postgres database is up and running. TODO: change this to poll"
sleep 5
/pact_broker/entrypoint.sh

0 comments on commit d4349ca

Please sign in to comment.