Skip to content

Commit

Permalink
Build image for Postgres 17
Browse files Browse the repository at this point in the history
  • Loading branch information
andyundso committed Sep 27, 2024
1 parent 45c2bcf commit 4a13751
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
- "14"
- "15"
- "16"
- "17"

steps:
- name: Set up QEMU
Expand Down
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ _main() {
if [ "${PGTARGET}" -gt 15 ] && [ "${PGVER}" = "15" ]; then
RECOGNISED=1
fi
if [ "${PGTARGET}" -gt 16 ] && [ "${PGVER}" = "16" ]; then
RECOGNISED=1
fi
if [ "${RECOGNISED}" -eq 1 ]; then
OLDPATH="/usr/local-pg${PGVER}"
echo "*******************************************************************************************"
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eux
FAILURE=0

# Array of PostgreSQL versions for testing
PG_VERSIONS=(9.5 9.6 10 11 12 13 14 15 16)
PG_VERSIONS=(9.5 9.6 10 11 12 13 14 15 16 17)

# Stop any existing containers from previous test runs
test_down() {
Expand Down
58 changes: 58 additions & 0 deletions test/docker-compose-pg16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version: "2.1"
x-redash-service: &redash-service
image: redash/redash:10.1.0.b50633
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
env_file: .env
restart: always
services:
server:
<<: *redash-service
command: server
ports:
- "127.0.0.1:5000:5000"
environment:
REDASH_WEB_WORKERS: 22
scheduler:
<<: *redash-service
command: scheduler
scheduled_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "scheduled_queries,schemas"
WORKERS_COUNT: 2
adhoc_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "queries"
WORKERS_COUNT: 2
redis:
image: redis:7-alpine
restart: always
healthcheck:
test: redis-cli -h 127.0.0.1 ping | grep -q PONG
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:16-alpine
env_file: .env
volumes:
- ./postgres-data:/var/lib/postgresql/data
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
worker:
<<: *redash-service
command: worker
environment:
QUEUES: "periodic emails default"
WORKERS_COUNT: 2

0 comments on commit 4a13751

Please sign in to comment.