Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The Trino Gateway is available at [http://localhost:8080](http://localhost:8080)

The PostgreSQL backend database for Trino Gateway runs on `localhost:5432`. You
can query it for troubleshooting and other purposes using the credentials and
details found in the `postgres-backend-compose.yml` file.
details found in the `docker-compose.yml` file.

## Configuration

Expand Down
31 changes: 25 additions & 6 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
version: "3.4"
services:
trino-gateway:
extends:
file: ./trino-gateway-compose.yml
service: trino-gateway
image: ${TRINO_GATEWAY_IMAGE:-trinodb/trino-gateway:latest}
depends_on:
postgres:
condition: service_healthy
healthcheck:
interval: 5s
timeout: 5s
retries: 60
start_period: 20s
ports:
- "8080:8080"
volumes:
- target: /opt/trino/gateway-ha-config.yml
source: ../gateway-ha/gateway-ha-config-docker.yml
type: bind

postgres:
extends:
file: ./postgres-backend-compose.yml
service: postgres
image: ${TRINO_GATEWAY_POSTGRES_IMAGE:-postgres}
environment:
- PGPORT=5432
- POSTGRES_PASSWORD=P0stG&es
- POSTGRES_DB=trino_gateway_db
- POSTGRES_USER=trino_gateway_db_admin
ports:
- "5432:5432"
healthcheck:
# Need user and database name to check PostgreSQL server status
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB || exit 1"]
interval: 1s
timeout: 1s
retries: 60
start_period: 10s
volumes:
- target: /docker-entrypoint-initdb.d/1-gateway-ha-persistence-postgres.sql
source: ../gateway-ha/src/main/resources/gateway-ha-persistence-postgres.sql
type: bind
21 changes: 0 additions & 21 deletions docker/postgres-backend-compose.yml

This file was deleted.

21 changes: 0 additions & 21 deletions docker/trino-gateway-compose.yml

This file was deleted.