Skip to content

Instantly share code, notes, and snippets.

@ihrwein
Created March 15, 2019 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihrwein/91153508e504733920594aa8ebb37280 to your computer and use it in GitHub Desktop.
Save ihrwein/91153508e504733920594aa8ebb37280 to your computer and use it in GitHub Desktop.
Running vessel-itinerary-domain-service on local dev machine
export APP_JWT_VERIFY_TOKEN="false"
export APP_OUTPUT_CONFIG="true"
export APP_LOG_LEVEL="DEBUG"
export APP_PRETTY_LOG_OUTPUT="true"
export APP_EXTERNAL_DATA_GATEWAY_ADDRESS="http://vessel-itinerary-domain-service-stubs:8001"
export APP_ELASTICSEARCH_ENABLE="true"
export APP_ELASTICSEARCH_HOST="localhost"
export APP_ELASTICSEARCH_PORT="9200"
export APP_ELASTICSEARCH_MAPPING_CONFIG="./infrastructure/data/mapping.json"
export APP_FEATURE_ADD_PORT_CALL="true"
export APP_KAFKA_STUB="false"
export APP_KAFKA_ENABLE="true"
export APP_KAFKA_BROKER="localhost:9092"
export APP_KAFKA_SSL="false"
export APP_KAFKA_GROUP="vessel-itinerary"
export APP_KAFKA_SCHEMA_REGISTRY_HOST="http://localhost:8082"
export APP_KAFKA_TOPIC_PORT_CALL="event_vessel_itinerary_port_call"

Add the following entry to your /etc/hosts file:

127.0.0.1 kafka-broker

Depending on how far we progress, you may need to disable permission checks:

WithNoPermsRequired(api.VesselItineraryDomainService_CreatePortCall).

version: '3.2'
services:
vessel-itinerary-domain-service-stubs:
build:
context: ..
dockerfile: tests_system/stubs/Dockerfile
environment:
GODEBUG: "http2debug=2"
ports:
- 8001:8001
elastic-search:
image: elasticsearch:6.5.4
ports:
- 9200:9200
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
kafka-zookeeper:
image: confluentinc/cp-zookeeper:4.1.2
hostname: kafka-zookeeper
ports:
- 2181:2181
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
restart: on-failure
kafka-broker:
image: confluentinc/cp-kafka:4.1.2
hostname: kafka-command-broker
depends_on:
- kafka-zookeeper
ports:
- 9092:9092
expose:
- 9092
environment:
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'kafka-zookeeper:2181/kafka'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka-broker:9092'
# KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTO_COMMIT_ENABLE: 'false'
restart: on-failure
schema-registry:
image: confluentinc/cp-schema-registry
hostname: schema-registry
depends_on:
- kafka-zookeeper
ports:
- 8082:8081
environment:
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: "kafka-zookeeper:2181/kafka"
SCHEMA_REGISTRY_HOST_NAME: "kafka-zookeeper"
SCHEMA_REGISTRY_LISTENERS: "http://schema-registry:8081"
SCHEMA_REGISTRY_DEBUG: "false"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment