Skip to content

Commit

Permalink
Upd: Pass/override container images on runtime
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Jan 10, 2024
1 parent cea4d5a commit 5808209
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ help:
@echo "------------------------------------------------------------------------"
@grep -E '^[0-9a-zA-Z_/%\-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

# You can customize the default values or override them by passing parameters
export MONGODB_IMAGE ?= zcube/bitnami-compat-mongodb:6.0.5
export POSTGRESQL_IMAGE ?= bitnami/postgresql:14.10.0
export KEYCLOAK_IMAGE ?= docker.io/bitnami/keycloak:22.0.2-debian-11-r0
export API_IMAGE ?= igrantio/bb-consent-api:2023.12.2
export CADDY_IMAGE ?= igrantio/bb-consent-caddy:2023.12.2
export FIXTURES_IMAGE ?= igrantio/bb-consent-fixtures:2023.12.2

destroy: ## Delete all containers and volumes
@if [ -n "$$(docker container ls -aq)" ]; then \
docker container rm -f $$(docker container ls -aq); \
Expand All @@ -31,7 +39,7 @@ build-test: ## Build behave image
docker build --platform=linux/amd64 -t igrantio/bb-consent-test-runner:dev -f Dockerfile .

run-test: ## Run BDD test
docker run --network=test_custom_network -v ./allure-results:/tests/allure-results -v ./allure-report:/tests/allure-report igrantio/bb-consent-test-runner:dev
docker run --network=test_custom_network -v ./allure-results:/tests/allure-results igrantio/bb-consent-test-runner:dev

setup-dev: ## Setup api, admin and privacy dashboard for development branch tests
sudo rm -rf temp && \
Expand Down
12 changes: 6 additions & 6 deletions test/test-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
mongo:
image: zcube/bitnami-compat-mongodb:6.0.5
image: ${MONGODB_IMAGE:-zcube/bitnami-compat-mongodb:6.0.5}
container_name: mongo
environment:
- MONGODB_DATABASE=bb-consent-consentdb
Expand All @@ -13,7 +13,7 @@ services:
- custom_network

postgresql:
image: bitnami/postgresql:14.10.0
image: ${POSTGRESQL_IMAGE:-bitnami/postgresql:14.10.0}
container_name: postgresql
environment:
- POSTGRESQL_USERNAME=bn_keycloak
Expand All @@ -23,7 +23,7 @@ services:
- custom_network

keycloak:
image: docker.io/bitnami/keycloak:22.0.2-debian-11-r0
image: ${KEYCLOAK_IMAGE:-docker.io/bitnami/keycloak:22.0.2-debian-11-r0}
container_name: keycloak
restart: always
environment:
Expand All @@ -44,7 +44,7 @@ services:
- custom_network

api:
image: igrantio/bb-consent-api:2023.12.2
image: ${API_IMAGE:-igrantio/bb-consent-api:2023.12.2}
container_name: api
restart: always
ports:
Expand All @@ -58,7 +58,7 @@ services:
- custom_network

caddy:
image: igrantio/bb-consent-caddy:2023.12.2
image: ${CADDY_IMAGE:-igrantio/bb-consent-caddy:2023.12.2}
container_name: caddy
ports:
- "3333:80"
Expand All @@ -73,7 +73,7 @@ services:
- custom_network

fixtures:
image: igrantio/bb-consent-fixtures:2023.12.2
image: ${FIXTURES_IMAGE:-igrantio/bb-consent-fixtures:2023.12.2}
container_name: fixtures
volumes:
- ./test-data.json:/app/data.json:ro
Expand Down

0 comments on commit 5808209

Please sign in to comment.