Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait until db ready #231

Merged
merged 14 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 10s
jhazentia marked this conversation as resolved.
Show resolved Hide resolved
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
Loading