Skip to content

Instantly share code, notes, and snippets.

@azagniotov
Created May 2, 2021 23:32
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 azagniotov/1f69301a19cc0b0f402db1b231a2a9fb to your computer and use it in GitHub Desktop.
Save azagniotov/1f69301a19cc0b0f402db1b231a2a9fb to your computer and use it in GitHub Desktop.
Using stubby4j in docker-compose.yaml
# This section builds flight-booking application image to the stack
version: '3.8'
services:
flight-booking-service:
build: .
container_name: flight-booking-service
ports:
- 8080:8080
environment:
SPRING_APPLICATION_PROPERTIES_PROFILE: testing-in-docker
ACCOUNT_SERVICE_HOST: http://stubby4j
RESERVATION_SERVICE_HOST: http://stubby4j
networks:
- bridged
# This section adds stubby4j https://hub.docker.com/r/azagniotov/stubby4j to the stack
#
# See "How to use this image" & "Environment variables" sections at https://hub.docker.com/r/azagniotov/stubby4j
stubby4j:
image: azagniotov/stubby4j:7.3.3-jre8 # you can also use other tags: latest-jre8, latest-jre11, latest-jre15
volumes:
- "./stubby4j-yaml-config:/home/stubby4j/data"
container_name: stubby4j
ports:
- 8882:8882
- 8889:8889
- 7443:7443
environment:
YAML_CONFIG: stubs.yaml
LOCATION: 0.0.0.0
STUBS_PORT: 8882
ADMIN_PORT: 8889
STUBS_TLS_PORT: 7443
WITH_DEBUG: --debug
WITH_WATCH: --watch
networks:
- bridged
networks:
bridged:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment