Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active February 2, 2021 19:56
Show Gist options
  • Save percybolmer/b74cf38cd1e8dc72cd5b4c3ed6034e9d to your computer and use it in GitHub Desktop.
Save percybolmer/b74cf38cd1e8dc72cd5b4c3ed6034e9d to your computer and use it in GitHub Desktop.
version: "3.0"
services:
redis:
image: "redis:alpine"
# The Command will make redis-server run with our custom Configuration
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis/data:/data #Used for persisting data
- ./redis/conf:/usr/local/etc/redis #Used for configuring redis
networks:
- data_sharing
publisher:
# Makes the compose- build our Image based on the files in publisher folder
build:
context: ./publisher
dockerfile: Dockerfile
depends_on:
- redis
networks:
- data_sharing
subscriber:
build:
context: ./subscriber
dockerfile: Dockerfile
depends_on:
- redis
- publisher
networks:
- data_sharing
networks:
data_sharing:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment