Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Modified compose dependencies and removed console from compose #85

Open
wants to merge 1 commit into
base: v0.2.1
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ push-scanner:
# Development env based on Docker/Podman Compose tool
start-dev:
@echo "### [Starting dev environment] ###"
@$(CONTAINER_ENGINE)-compose -f $(DEPLOYMENTS_DIR)/docker-compose/docker-compose.yaml up -d
@$(CONTAINER_ENGINE)-compose -f $(DEPLOYMENTS_DIR)/compose/compose-devel.yaml up -d

stop-dev:
@echo "### [Stopping dev environment] ###"
@$(CONTAINER_ENGINE)-compose -f $(DEPLOYMENTS_DIR)/docker-compose/docker-compose.yaml down
@$(CONTAINER_ENGINE)-compose -f $(DEPLOYMENTS_DIR)/compose/compose-devel.yaml down

restart-dev: stop-dev start-dev

init-psql-test-data:
export PGPASSWORD=password ; psql -h localhost -p 5432 -U user -d clusteriq < db/sql/test_data.sql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
version: "3.7"
services:
console:
image: quay.io/ecosystem-appeng/cluster-iq-console:latest
container_name: console
restart: always
depends_on:
api:
condition: service_healthy
ports:
- 8080:3000
environment:
REACT_APP_CIQ_API_URL: "http://api:8080"
api:
image: quay.io/ecosystem-appeng/cluster-iq-api:latest
container_name: api
restart: always
depends_on:
init-pgsql:
condition: service_healthy
condition: service_completed_successfully
ports:
- 8081:8080
environment:
Expand All @@ -29,6 +18,9 @@ services:
image: quay.io/ecosystem-appeng/cluster-iq-scanner:latest
container_name: scanner
restart: "no"
depends_on:
api:
condition: service_started
environment:
CIQ_API_URL: "http://api:8080/api/v1"
CIQ_CREDS_FILE: "/credentials"
Expand All @@ -49,7 +41,7 @@ services:
POSTGRESQL_ADMIN_PASSWORD: "admin"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
interval: 15s
timeout: 5s
retries: 5

Expand All @@ -58,7 +50,9 @@ services:
container_name: init-pgsql
restart: "no"
command: |
sh -c 'while true; do psql postgresql://user:password@pgsql:5432/clusteriq -c "SELECT true" && break || sleep 2; done; psql postgresql://user:password@pgsql:5432/clusteriq < /init.sql'
sh -c ' while true; do psql postgresql://user:password@pgsql:5432/clusteriq -c "SELECT true" && break || sleep 2 done
psql postgresql://user:password@pgsql:5432/clusteriq < /init.sql && { echo "Ok"; } || { echo "Initialization Failed"; exit 1; }
'
volumes:
- ./../../db/sql/init.sql:/init.sql
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion deployments/containerfiles/Containerfile-api
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cluster-iq-api -ldflags "-

## Run
####################
FROM registry.access.redhat.com/ubi8/ubi-micro:8.8-5
FROM registry.access.redhat.com/ubi8/ubi-micro:8.10-15

# Labels
LABEL version="v0.2"
Expand Down