Skip to content

Commit

Permalink
Merge pull request #231 from NTIA/wait_until_db_ready
Browse files Browse the repository at this point in the history
Wait until db ready
  • Loading branch information
dboulware authored Mar 15, 2024
2 parents 1cdf5d7 + 84f189a commit 82aabc2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ services:
- '127.0.0.1:5432:5432'
volumes:
- ./dbdata:/var/lib/postgresql/data
healthcheck:
test: pg_isready -U postgres
interval: 2s
timeout: 3s
retries: 1
start_period: 30s

api:
healthcheck:
Expand All @@ -20,7 +26,8 @@ services:
shm_size: '16gb'
restart: always
depends_on:
- db
db:
condition: service_healthy
labels:
autoheal: "true" # allow docker-autoheal to restart if unhealthy
image: smsntia/scos-sensor:${DOCKER_TAG} # DOCKER_TAG will always be 'latest' for GitHub source
Expand Down
6 changes: 2 additions & 4 deletions scripts/create_localhost_cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ DNS.1 = localhost
IP.1 = 127.0.0.1" > localhost.ext
openssl x509 -req -passin pass:"changeme" -CA scostestca.pem -CAkey scostestca.key -in localhost.csr -out localhost.pem -days 365 -sha256 -CAcreateserial -extfile localhost.ext
cat localhost.key localhost.pem > localhost_combined.pem
cp scostestca.pem ../configs/certs/
mv ../configs/certs/scostestca.pem ../configs/certs/scos_test_ca.crt
cp localhost_combined.pem ../configs/certs/
mv ../configs/certs/localhost_combined.pem ../configs/certs/sensor01.pem
cp scostestca.pem ../configs/certs/scos_test_ca.crt
cp localhost_combined.pem ../configs/certs/sensor01.pem
2 changes: 1 addition & 1 deletion src/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ scos_tekrsa @ git+https://github.com/NTIA/[email protected]
# This is done to ensure the inclusion of specific security patches.
pyyaml>=5.4.0 # CVE-2020-14343
grpcio>=1.53.0 # CVE-2023-32732, CVE-2023-32731, CVE-2023-1428
urllib3>=1.26.18 # CVE-2023-45803
urllib3>=1.26.18 # CVE-2023-45803

0 comments on commit 82aabc2

Please sign in to comment.