Skip to content

Instantly share code, notes, and snippets.

@kunokdev
Last active April 1, 2019 00:54
Show Gist options
  • Save kunokdev/a982213a0527d1990289d728571667a6 to your computer and use it in GitHub Desktop.
Save kunokdev/a982213a0527d1990289d728571667a6 to your computer and use it in GitHub Desktop.
A sample docker-compose for running network of services
version: "3.2"
services:
gateway-proxy:
image: kunokdev/gateway-proxy:${TAG:-latest}
restart: always
ports:
- "5000:80"
networks:
- private-network
environment:
- "USER_SERVICE_URL=http://user-service"
user-service:
image: kunokdev/user-service:${TAG:-latest}
restart: always
networks:
- private-network
environment:
- "MONGO_URL=mongodb://mongo"
item-service:
image: kunokdev/item-service:${TAG:-latest}
restart: always
networks:
- private-network
environment:
- "MONGO_URL=mongodb://mongo"
- "INVENTORY_SERVICE_URL=http://inventory-service"
inventory-service:
image: kunokdev/inventory-service:${TAG:-latest}
restart: always
networks:
- private-network
environment:
- "MONGO_URL=mongodb://mongo"
mongo:
image: mongo:${MONGO_TAG-latest}
volumes:
- ./data:/data/db
networks:
- private-network
networks:
private-network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment