-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (43 loc) · 1.45 KB
/
docker-compose.yml
File metadata and controls
51 lines (43 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Central file in a docker-compose pipeline
# Defines the containers of the pipeline and some environment variables and configuration information
version: '3.1' # Version of Docker Compose
# Each service is a container
services:
# 1. Container
tweet_collector: # Name of the service
build: tweet_collector/ # Build the container using an Docker image definition that is in the directory tweet_collector
volumes:
- ./tweet_collector/:/app # volumes creates a synchronization between your local directory ./tweet_collector with the container directory
# /app
depends_on: # depends_on tells docker-compose to start the service mongodb before the current service;
- mongodb
# 2. Container
mongodb: # Name of the service
image: mongo # In this case we are telling docker to pull a predefined image from Docker-Hub
ports: # Define port of the MongoDB database on_local_machine:inside_of_container
- 27018:27017 # on_local_machine:inside_of_container
# 3. Container
etl_job:
build: etl_job/
volumes:
- ./etl_job/:/app
depends_on:
- mongodb
- postgresdb
# 4. Container
postgresdb:
image: postgres
ports:
- 5555:5432
environment:
POSTGRES_USER: docker_postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: tweets_db
# 5. Container
slackbot:
build: slackbot/
volumes:
- ./slackbot/:/app
depends_on:
- mongodb
- postgresdb