-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add local build and compose scripts/configurations
Signed-off-by: Michael Edgar <[email protected]>
- Loading branch information
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
.PHONY: container-image-api container-image-ui container-images | ||
|
||
include *compose.env | ||
|
||
CONSOLE_API_IMAGE ?= localhost/eyefloaters/console-api | ||
CONSOLE_API_ACCOUNT ?= streams-console-service-account | ||
CONSOLE_API_NS ?= default | ||
CONSOLE_UI_IMAGE ?= localhost/eyefloaters/console-ui | ||
CONSOLE_UI_NEXTAUTH_SECRET ?= $(shell openssl rand -base64 32) | ||
|
||
container-image-api: | ||
mvn package -f api/pom.xml -Pdocker -DskipTests -Dquarkus.container-image.image=$(CONSOLE_API_IMAGE) | ||
|
||
container-image-ui: | ||
docker build -t $(CONSOLE_UI_IMAGE) ./ui -f ./ui/Dockerfile | ||
|
||
container-images: container-image-api container-image-ui | ||
|
||
compose-up: container-images | ||
> compose-runtime.env | ||
echo "CONSOLE_API_IMAGE=$(CONSOLE_API_IMAGE)" >> compose-runtime.env | ||
echo "CONSOLE_API_SERVICE_ACCOUNT_TOKEN=$(CONSOLE_API_SERVICE_ACCOUNT_TOKEN)" >> compose-runtime.env | ||
echo "CONSOLE_API_KUBERNETES_API_SERVER_URL=$(CONSOLE_API_KUBERNETES_API_SERVER_URL)" >> compose-runtime.env | ||
echo "CONSOLE_UI_IMAGE=$(CONSOLE_UI_IMAGE)" >> compose-runtime.env | ||
echo "CONSOLE_UI_NEXTAUTH_SECRET=$(CONSOLE_UI_NEXTAUTH_SECRET)" >> compose-runtime.env | ||
docker compose --env-file compose-runtime.env up -d | ||
|
||
compose-down: | ||
docker compose --env-file compose-runtime.env down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
version: '3.9' | ||
|
||
networks: | ||
streams-console: | ||
driver: bridge | ||
|
||
services: | ||
console-api: | ||
image: ${CONSOLE_API_IMAGE} | ||
hostname: api | ||
container_name: console-api | ||
volumes: | ||
- ${PWD}/console-config.yaml:/deployments/console-config.yaml:z | ||
environment: | ||
CONSOLE_CONFIG_PATH: /deployments/console-config.yaml | ||
QUARKUS_KUBERNETES_CLIENT_API_SERVER_URL: ${CONSOLE_API_KUBERNETES_API_SERVER_URL} | ||
QUARKUS_KUBERNETES_CLIENT_TOKEN: ${CONSOLE_API_SERVICE_ACCOUNT_TOKEN} | ||
networks: | ||
- streams-console | ||
|
||
console-ui: | ||
image: ${CONSOLE_UI_IMAGE} | ||
hostname: ui | ||
container_name: console-ui | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
NEXTAUTH_SECRET: ${CONSOLE_UI_NEXTAUTH_SECRET} | ||
NEXTAUTH_URL: http://localhost:3000 | ||
BACKEND_URL: http://api:8080/ | ||
networks: | ||
- streams-console |