From 6992e51428446f3d11e962d3364845444d4cd005 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Fri, 17 May 2024 21:16:54 +0000 Subject: [PATCH 1/2] Update for local dev --- Makefile | 4 ++-- docker-compose.yml | 4 ++-- trovi/settings.py | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d317006..787b22d 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ ifneq (,$(wildcard ./.env)) endif DOCKER_TAG ?= $(shell git rev-parse --short HEAD) -DOCKER_IMAGE ?= $(DOCKER_REGISTRY)/trovi:$(DOCKER_TAG) -DOCKER_IMAGE_LATEST ?= $(DOCKER_REGISTRY)/trovi:latest +DOCKER_IMAGE ?= trovi:$(DOCKER_TAG) +DOCKER_IMAGE_LATEST ?= trovi:latest DOCKER_DEV_IMAGE ?= trovi-dev:$(DOCKER_TAG) DOCKER_DEV_IMAGE_LATEST ?= trovi-dev:latest DOCKER_DIR ?= docker diff --git a/docker-compose.yml b/docker-compose.yml index 8979565..e408c1e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.5" services: trovi: container_name: trovi_web - image: ${DOCKER_IMAGE_LATEST} + image: trovi-dev restart: on-failure healthcheck: test: ["CMD", "curl", "-f", "http://localhost:${TROVI_PORT}/artifacts/?limit=1"] @@ -16,7 +16,7 @@ services: - ./media:/media - static:/static ports: - - "127.0.0.1:${TROVI_PORT}:${TROVI_PORT}" + - "8808:8808" entrypoint: ["python3", "manage.py"] command: ["runserver", "0.0.0.0:${TROVI_PORT}"] depends_on: diff --git a/trovi/settings.py b/trovi/settings.py index 2dde303..6409839 100644 --- a/trovi/settings.py +++ b/trovi/settings.py @@ -51,6 +51,7 @@ ALLOWED_HOSTS = [ "localhost", "127.0.0.1", + "chameleon.local", TROVI_FQDN, ] From ce4edb6c4b5650e404b08dce0206d58688ebc6d1 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Mon, 20 May 2024 19:57:40 +0000 Subject: [PATCH 2/2] Update sample env --- .env.sample | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.env.sample b/.env.sample index 312f6cd..34f6898 100644 --- a/.env.sample +++ b/.env.sample @@ -16,7 +16,7 @@ DJANGO_LOG_LEVEL=DEBUG DJANGO_SQL_LEVEL=INFO # Database -DB_ENGINE= +DB_ENGINE=django.db.backends.mysql DB_NAME=trovi DB_HOST=db DB_PORT=3306 @@ -49,11 +49,11 @@ OPENSTACK_SERVICE_PASSWORD= # Commont out in prod for randomly generated key TROVI_TOKEN_SIGNING_KEY=heehooimmasigningkey # Keycloak realm management -CHAMELEON_KEYCLOAK_SERVER_URL=https://auth.dev.chameleoncloud.org/auth -CHAMELEON_KEYCLOAK_REALM_NAME=chameleon +CHAMELEON_KEYCLOAK_SERVER_URL=https://chameleon.local:8080/auth +CHAMELEON_KEYCLOAK_REALM_NAME=Chameleon # This client is in the Keycloak "master" realm -CHAMELEON_KEYCLOAK_TROVI_ADMIN_CLIENT_ID=trovi-dev -CHAMELEON_KEYCLOAK_TROVI_ADMIN_CLIENT_SECRET= +CHAMELEON_KEYCLOAK_TROVI_ADMIN_CLIENT_ID=trovi-local-dev +CHAMELEON_KEYCLOAK_TROVI_ADMIN_CLIENT_SECRET=trovi-local-dev-secret # Testing CHAMELEON_KEYCLOAK_TEST_USER_USERNAME= CHAMELEON_KEYCLOAK_TEST_USER_PASSWORD=