Last active
April 27, 2018 10:00
-
-
Save UsamaAshraf/009e92d69ed0ef6dba66e534ca3d7bdc to your computer and use it in GitHub Desktop.
Docker Compose file for Python & Go services communicating via RabbitMQ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker-compose.yml | |
version: "3.2" | |
services: | |
rabbitmq-server: | |
build: ./rabbitmq-server | |
python-service: | |
build: ./python-service | |
# 'rabbitmq-server' will be available as a network reference inside this service | |
# and this service will start only after the RabbitMQ service does. | |
depends_on: | |
- rabbitmq-server | |
# Keep it running. | |
tty: true | |
# Map port 3000 on the host machine to port 3000 of the container. | |
# This will be used to receive HTTP requests made to the service. | |
ports: | |
- "3000:3000" | |
volumes: | |
- './python-service:/python-service' | |
go-service: | |
build: ./go-service | |
depends_on: | |
- rabbitmq-server | |
tty: true | |
volumes: | |
- './go-service:/go-service' | |
# Host volumes used to store code. | |
volumes: | |
python-service: | |
go-service: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment