Skip to content

Commit

Permalink
Merge pull request #7 from krlmlr/f-timeout
Browse files Browse the repository at this point in the history
chore: More aggressive health check
  • Loading branch information
aavanesy authored Feb 4, 2024
2 parents b46147a + 3d278e3 commit fca57c5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 30 deletions.
8 changes: 4 additions & 4 deletions compose_files/docker-compose.maria.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ services:
- maria-db:/var/lib/mysql
healthcheck:
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
start_period: 5s
start_interval: 10s
interval: 10s
start_period: 4s
start_interval: 1s
interval: 0.2s
timeout: 5s
retries: 3
retries: 100
ports:
- "3306:3306"
networks:
Expand Down
9 changes: 5 additions & 4 deletions compose_files/docker-compose.mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ services:
healthcheck:
# test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "YourStrong!Passw0rd" -Q "SELECT 1" -b -o /dev/null
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "YourStrong!Passw0rd" -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'test') BEGIN CREATE DATABASE test; END ELSE BEGIN SELECT 1; END;" -b -o /dev/null
interval: 10s
timeout: 3s
retries: 10
start_period: 10s
start_period: 4s
start_interval: 1s
interval: 0.2s
timeout: 5s
retries: 100
volumes:
- mssql-db:/var/opt/mssql
ports:
Expand Down
9 changes: 5 additions & 4 deletions compose_files/docker-compose.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ services:
MYSQL_PASSWORD: "YourStrong!Passw0rd"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-pYourStrong!Passw0rd"]
interval: 20s
timeout: 10s
retries: 3
start_period: 5s
start_period: 4s
start_interval: 1s
interval: 0.2s
timeout: 5s
retries: 100
ports:
- "3307:3306"
networks:
Expand Down
9 changes: 5 additions & 4 deletions compose_files/docker-compose.oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ services:
- oracle-network
healthcheck:
test: ["CMD-SHELL", "cat /sql/init.sql | sqlplus -S SYS/Oradoc_db1 AS SYSDBA"]
interval: 30s
timeout: 3s
retries: 2
start_period: 30s
start_period: 4s
start_interval: 1s
interval: 0.2s
timeout: 5s
retries: 100
volumes:
- oracle-db:/opt/oracle/oradata
- ./init.sql:/sql/init.sql
6 changes: 4 additions & 2 deletions compose_files/docker-compose.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ services:
POSTGRES_PASSWORD: "YourStrong!Passw0rd"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
start_period: 4s
start_interval: 1s
interval: 0.2s
timeout: 5s
retries: 5
retries: 100
volumes:
- postgres-db:/var/lib/postgresql/data
ports:
Expand Down
12 changes: 0 additions & 12 deletions compose_files/docker-compose.sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,3 @@ services:
# simple test
- ./test/test-sqlite.R:/root/workspace/.Rprofile
entrypoint: ["R"]

# sqlite:
# container_name: sqlite
# #https://github.com/KEINOS/Dockerfile_of_SQLite3 - built weekly
# image: keinos/sqlite3:latest
# volumes:
# - ./data:/data
# working_dir: /data
# command: sqlite3
# stdin_open: true
# tty: true

0 comments on commit fca57c5

Please sign in to comment.