-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (62 loc) · 1.37 KB
/
docker-compose.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3.7"
volumes:
articlespgvolume:
name: articles-pg-volume
mongodb_data_container:
networks:
articlesnetwork:
name: articles-network
services:
pg:
image: postgres:12.1
restart: on-failure
env_file:
- .env
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- articlespgvolume:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- articlesnetwork
mongo:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_USER}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_PASSWORD}"
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
volumes:
- mongodb_data_container:/data/db
networks:
- articlesnetwork
usertags:
build:
context: .
dockerfile: usertags/Dockerfile
restart: on-failure
depends_on:
- pg
ports:
- "${UT_HTTP_PORT}:${UT_HTTP_PORT}"
- "${GRPC_PORT}:${GRPC_PORT}"
networks:
- articlesnetwork
env_file:
- .env
entrypoint: ["/bin/bash", "./entrypoint.sh"]
newsfeed:
build:
context: .
dockerfile: newsfeed/Dockerfile
restart: on-failure
depends_on:
- mongo
- usertags
ports:
- "${NF_HTTP_PORT}:${NF_HTTP_PORT}"
networks:
- articlesnetwork
env_file:
- .env
entrypoint: ["/bin/bash", "./entrypoint.sh"]