Skip to content

Commit

Permalink
Mv keycloak to docker-compose.custom, mv fixtures to demo
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Apr 3, 2024
1 parent 4b8a547 commit 5d7f04a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions docker-compose.custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ services:
build:
context: .
dockerfile: dockerfiles/Dockerfile.stac
args:
- INSTALL_EXTRA=[jwt]
ports:
- "${MY_DOCKER_IP:-127.0.0.1}:8081:8081"
environment:
Expand Down Expand Up @@ -49,6 +51,10 @@ services:
# PgSTAC extensions
# - EOAPI_STAC_EXTENSIONS=["filter", "query", "sort", "fields", "pagination", "context", "transaction"]
# - EOAPI_STAC_CORS_METHODS='GET,POST,PUT,OPTIONS'
- KEYCLOAK_REALM=eoapi
- KEYCLOAK_HOST=http://localhost:8080
- KEYCLOAK_CLIENT_ID=stac-api
- KEYCLOAK_INTERNAL_HOST=http://keycloak:8080
depends_on:
- database
- raster
Expand Down Expand Up @@ -276,6 +282,20 @@ services:
command: postgres -N 500
volumes:
- ./.pgdata:/var/lib/postgresql/data

keycloak:
profiles:
- keycloak
image: quay.io/keycloak/keycloak:latest
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
ports:
- "8080:8080"
- "9990:9990"
command: start-dev --import-realm
volumes:
- ./demo/keycloak:/opt/keycloak/data/import

networks:
default:
Expand Down
14 changes: 1 addition & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
# Application
- HOST=0.0.0.0
- PORT=8081
- MODULE_NAME=eoapi.stac.app
- MODULE_NAME=stac_fastapi.pgstac.app
- VARIABLE_NAME=app
# gunicorn
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
Expand Down Expand Up @@ -145,18 +145,6 @@ services:
volumes:
- ./.pgdata:/var/lib/postgresql/data

keycloak:
image: quay.io/keycloak/keycloak:latest
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
ports:
- "8080:8080"
- "9990:9990"
command: start-dev --import-realm
volumes:
- ./auth/keycloak:/opt/keycloak/data/import

networks:
default:
name: eoapi-network
4 changes: 3 additions & 1 deletion dockerfiles/Dockerfile.stac
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ ARG PYTHON_VERSION=3.11

FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}

ARG INSTALL_EXTRA=

ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt

COPY runtime/eoapi/stac /app/stac
RUN pip install -e "/app/stac[jwt]"
RUN pip install -e "/app/stac${INSTALL_EXTRA}"

ENV MODULE_NAME eoapi.stac.app
ENV VARIABLE_NAME app

0 comments on commit 5d7f04a

Please sign in to comment.