FEAT: Init Discovery Service
This commit is contained in:
@@ -123,6 +123,34 @@ services:
|
||||
- action: rebuild
|
||||
path: ./cms
|
||||
|
||||
discovery:
|
||||
container_name: "${DISCOVERY_DOCKER_NAME:-discovery}"
|
||||
build:
|
||||
context: ./discovery
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080" # JSON API + Swagger UI at /swagger/
|
||||
environment:
|
||||
# Postgres only — discovery touches no AWS service, which is why it has
|
||||
# no task role in infrastructure/main.go and no AWS_* wiring here. Its
|
||||
# own role and database, provisioned alongside the cms ones by
|
||||
# newServiceDatabase, so the two services share no credentials.
|
||||
- DB_HOST=${DISCOVERY_DB_HOST:-localhost.localstack.cloud}
|
||||
- DB_PORT=${DISCOVERY_DB_PORT:-4510}
|
||||
- DB_NAME=${DISCOVERY_DB_NAME:-discovery}
|
||||
- DB_USER=${DISCOVERY_DB_USER:-discovery}
|
||||
- DB_PASSWORD=${DB_PASSWORD:?}
|
||||
- DB_SSLMODE=${DISCOVERY_DB_SSLMODE:-disable}
|
||||
depends_on:
|
||||
infra:
|
||||
condition: service_completed_successfully
|
||||
develop:
|
||||
watch:
|
||||
# Same as cms: a compiled binary, so every change means a new image.
|
||||
# Needs `docker compose up --watch` (or `docker compose watch`).
|
||||
- action: rebuild
|
||||
path: ./discovery
|
||||
|
||||
volumes:
|
||||
pulumi-state:
|
||||
pulumi-home:
|
||||
|
||||
Reference in New Issue
Block a user