Skip to content

Commit 5d7f04a

Browse files
committed
Mv keycloak to docker-compose.custom, mv fixtures to demo
1 parent 4b8a547 commit 5d7f04a

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed
File renamed without changes.
File renamed without changes.

docker-compose.custom.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ services:
2020
build:
2121
context: .
2222
dockerfile: dockerfiles/Dockerfile.stac
23+
args:
24+
- INSTALL_EXTRA=[jwt]
2325
ports:
2426
- "${MY_DOCKER_IP:-127.0.0.1}:8081:8081"
2527
environment:
@@ -49,6 +51,10 @@ services:
4951
# PgSTAC extensions
5052
# - EOAPI_STAC_EXTENSIONS=["filter", "query", "sort", "fields", "pagination", "context", "transaction"]
5153
# - EOAPI_STAC_CORS_METHODS='GET,POST,PUT,OPTIONS'
54+
- KEYCLOAK_REALM=eoapi
55+
- KEYCLOAK_HOST=http://localhost:8080
56+
- KEYCLOAK_CLIENT_ID=stac-api
57+
- KEYCLOAK_INTERNAL_HOST=http://keycloak:8080
5258
depends_on:
5359
- database
5460
- raster
@@ -276,6 +282,20 @@ services:
276282
command: postgres -N 500
277283
volumes:
278284
- ./.pgdata:/var/lib/postgresql/data
285+
286+
keycloak:
287+
profiles:
288+
- keycloak
289+
image: quay.io/keycloak/keycloak:latest
290+
environment:
291+
KEYCLOAK_ADMIN: admin
292+
KEYCLOAK_ADMIN_PASSWORD: admin
293+
ports:
294+
- "8080:8080"
295+
- "9990:9990"
296+
command: start-dev --import-realm
297+
volumes:
298+
- ./demo/keycloak:/opt/keycloak/data/import
279299

280300
networks:
281301
default:

docker-compose.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ services:
2727
# Application
2828
- HOST=0.0.0.0
2929
- PORT=8081
30-
- MODULE_NAME=eoapi.stac.app
30+
- MODULE_NAME=stac_fastapi.pgstac.app
3131
- VARIABLE_NAME=app
3232
# gunicorn
3333
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
@@ -145,18 +145,6 @@ services:
145145
volumes:
146146
- ./.pgdata:/var/lib/postgresql/data
147147

148-
keycloak:
149-
image: quay.io/keycloak/keycloak:latest
150-
environment:
151-
KEYCLOAK_ADMIN: admin
152-
KEYCLOAK_ADMIN_PASSWORD: admin
153-
ports:
154-
- "8080:8080"
155-
- "9990:9990"
156-
command: start-dev --import-realm
157-
volumes:
158-
- ./auth/keycloak:/opt/keycloak/data/import
159-
160148
networks:
161149
default:
162150
name: eoapi-network

dockerfiles/Dockerfile.stac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ ARG PYTHON_VERSION=3.11
22

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

5+
ARG INSTALL_EXTRA=
6+
57
ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
68

79
COPY runtime/eoapi/stac /app/stac
8-
RUN pip install -e "/app/stac[jwt]"
10+
RUN pip install -e "/app/stac${INSTALL_EXTRA}"
911

1012
ENV MODULE_NAME eoapi.stac.app
1113
ENV VARIABLE_NAME app

0 commit comments

Comments
 (0)