Skip to content

Commit

Permalink
fixup! Added dockerization for the Trino Gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
rdsarvar committed Jan 22, 2024
1 parent 990d66e commit 9789280
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 48 deletions.
5 changes: 5 additions & 0 deletions docker/container-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ function test_gateway_starts {

set +e

# Ensure the platform specific image has been pulled locally for Postgres
DOCKER_DEFAULT_PLATFORM=${PLATFORM} \
docker compose -f "${COMPOSE_PATH}" \
pull ${COMPOSE_POSTGRES_NAME}

# We need to spin up dependencies for the container
# Timeout is built into the compose file in the form of healthcheck retry limits
TRINO_GATEWAY_IMAGE=${CONTAINER_NAME} \
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docker/minimal-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.4"
services:
gateway:
extends:
file: ../localdev/gateway-compose.yml
file: ./gateway-compose.yml
service: gateway
healthcheck:
interval: 5s
Expand All @@ -11,7 +11,7 @@ services:
start_period: 20s
postgres:
extends:
file: ../localdev/postgres-backend-compose.yml
file: ./postgres-backend-compose.yml
service: postgres
healthcheck:
interval: 1s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ services:
timeout: 3s
retries: 3
volumes:
- target: /docker-entrypoint-initdb.d/gateway-ha-persistence-postgres.sql
- target: /docker-entrypoint-initdb.d/1-gateway-ha-persistence-postgres.sql
source: ../gateway-ha/src/main/resources/gateway-ha-persistence-postgres.sql
type: bind
- target: /etc/postgresql/add_backends_postgres.sql
source: ./add_backends_postgres.sql
type: bind
5 changes: 3 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ From the root of the directory run the following commands to build the jar, dock
# Note - Feel free to change the architecture and version being targeted
# Without specifying a release version with '-r' it'll default to the current snapshot
bash docker/build.sh -a amd64
PLATFORM="amd64"
bash docker/build.sh -a ${PLATFORM}
# This grabs the version from the pom but you can manually specify it instead
TRINO_GATEWAY_VERSION=$("./mvnw" -f "pom.xml" --quiet help:evaluate -Dexpression=project.version -DforceStdout)
TRINO_GATEWAY_IMAGE="trino-gateway:${TRINO_GATEWAY_VERSION}-amd64" docker compose -f localdev/docker-compose.yml up -d gateway
TRINO_GATEWAY_IMAGE="trino-gateway:${TRINO_GATEWAY_VERSION}-${PLATFORM}" docker compose -f docker/minimal-compose.yml up -d
```

The [config file found here](/gateway-ha/gateway-ha-config-docker.yml) is mounted into the container.
Expand Down
39 changes: 0 additions & 39 deletions localdev/docker-compose.yml

This file was deleted.

1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

<air.java.version>17</air.java.version>
<air.check.skip-enforcer>true</air.check.skip-enforcer>
<air.check.skip-license>true</air.check.skip-license>
<air.check.skip-dependency>false</air.check.skip-dependency>
<air.check.fail-dependency>false</air.check.fail-dependency>
<air.check.skip-duplicate-finder>true</air.check.skip-duplicate-finder>
Expand Down

0 comments on commit 9789280

Please sign in to comment.