Skip to content

Commit

Permalink
makefile fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Phelps <[email protected]>
  • Loading branch information
naphelps committed Sep 16, 2024
1 parent 5b8ad5c commit ee15ed2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@ jobs:
DOCKER_REGISTRY: openhorizon
EXCHANGE_FE_HEADER: issuer
EXCHANGE_PEKKO_LOGLEVEL: debug
EXCHANGE_ROOTPW: ci-password
EXCHANGE_ROOT_PW: ci-password
POSTGRES_DB_NAME: exchange
POSTGRES_DB_PORT: 5432
POSTGRES_DB_USER: admin

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6

# Setup Scala
# Comes from open source action: https://github.com/coursier/setup-action
- name: Setup Scala
uses: coursier/setup-action@v1
with:
jvm: adoptium:1.17

- name: Create Docker Env
run: |
Expand All @@ -42,6 +45,7 @@ jobs:
make docker-network
docker run -d -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=$POSTGRES_DB_NAME -e POSTGRES_USER=$POSTGRES_DB_USER --network $DOCKER_NETWORK --name postgres postgres
export POSTGRES_CONTAINER_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres)
export EXCHANGE_DB_HOST=$POSTGRES_CONTAINER_ADDRESS
make run-docker
docker ps -a
docker network ls
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ EXCHANGE_HOST_TRUST_DIR ?= $(PROJECT_DIRECTORY)/target/etc/horizon/exchange/trus
EXCHANGE_ICP_CERT_FILE ?= /etc/horizon/exchange/icp/ca.crt
# Set to "DEBUG" to turn on debugging
EXCHANGE_LOG_LEVEL ?= DEBUG#INFO
EXCHANGE_PEKKO_LOG_LEVEL ?= $(EXCHANGE_LOG_LEVEL)
EXCHANGE_ROOT_PW ?=
# Number of days the SSL certificate is valid for
EXCHANGE_TRUST_DUR ?= 1
EXCHANGE_TRUST_PW ?=
Expand Down Expand Up @@ -210,13 +212,13 @@ target/docker/.run-docker: target/docker/.docker-network
--network $(DOCKER_NETWORK) \
-d -t \
-p $(EXCHANGE_HOST_PORT_HTTP):$(EXCHANGE_CONTAINER_PORT_HTTP) \
-e "EXCHANGE_DB_HOST=$$POSTGRES_CONTAINER_ADDRESS" \
-e EXCHANGE_DB_HOST=$(POSTGRES_CONTAINER_ADDRESS) \
-e EXCHANGE_DB_NAME=$(POSTGRES_DB_NAME) \
-e EXCHANGE_DB_PORT=$(POSTGRES_DB_PORT) \
-e EXCHANGE_DB_USER=$(POSTGRES_DB_USER) \
-e EXCHANGE_PEKKO_HTTP_PORT=$(EXCHANGE_CONTAINER_PORT_HTTP) \
-e "EXCHANGE_PEKKO_LOGLEVEL=$$EXCHANGE_PEKKO_LOGLEVEL" \
-e "EXCHANGE_ROOT_PW=$$EXCHANGE_ROOT_PW" \
-e EXCHANGE_PEKKO_LOGLEVEL=$(EXCHANGE_PEKKO_LOGLEVEL) \
-e EXCHANGE_ROOT_PW=$(EXCHANGE_ROOT_PW) \
$(IMAGE_STRING):$(DOCKER_TAG)
@touch $@

Expand All @@ -237,7 +239,7 @@ target/docker/.run-docker-icp-https: target/docker/.docker-network /etc/horizon/
-e EXCHANGE_DB_USER=$(POSTGRES_DB_USER) \
-e EXCHANGE_PEKKO_HTTP_PORT=$(EXCHANGE_CONTAINER_PORT_HTTP) \
-e EXCHANGE_PEKKO_HTTPS_PORT=$(EXCHANGE_CONTAINER_PORT_HTTPS) \
-e EXCHANGE_PEKKO_LOGLEVEL=$(EXCHANGE_LOG_LEVEL) \
-e EXCHANGE_PEKKO_LOGLEVEL=$(EXCHANGE_PEKKO_LOGLEVEL) \
-e "EXCHANGE_ROOT_PW=$$EXCHANGE_ROOT_PW" \
-e "EXCHANGE_TLS_PASSWORD=$$EXCHANGE_TRUST_PW" \
-e EXCHANGE_TLS_TRUSTSTORE=/etc/horizon/exchange/localhost.p12 \
Expand Down

0 comments on commit ee15ed2

Please sign in to comment.