-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
156 lines (144 loc) · 3.52 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
version: '3.9'
services:
postgres:
container_name: postgres
image: 'postgres:14.2'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: users
volumes:
- ./db-data/postgres/:/var/lib/postgresql/data/
ports:
- '5432:5432'
deploy:
mode: replicated
replicas: 1
networks:
- golang_microservices
mongodb:
container_name: mongodb
image: 'mongo:4.2.6-bionic'
ports:
- '27017:27017'
environment:
MONGO_INITDB_DATABASE: logs
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- ./db-data/mongo/:/data/db
deploy:
mode: replicated
replicas: 1
networks:
- golang_microservices
auth-service:
container_name: auth-service
image: guillesaez15/golang_microservices_auth:latest
build:
context: ./auth-service
dockerfile: auth-service.dockerfile
restart: always
deploy:
mode: replicated
replicas: 1
networks:
- golang_microservices
environment:
DSN: 'host=postgres port=5432 user=postgres password=password dbname=users sslmode=disable timezone=UTC connect_timeout=5'
front-end-service:
container_name: front-end-service
image: guillesaez15/golang_microservices_front_end:latest
build:
context: ./front-end
dockerfile: front-end-service.dockerfile
restart: always
ports:
- '81:80'
deploy:
mode: replicated
replicas: 1
networks:
- golang_microservices
broker-service:
container_name: broker-service
image: guillesaez15/golang_microservices_broker:latest
build:
context: ./broker-service
dockerfile: broker-service.dockerfile
restart: always
deploy:
mode: replicated
replicas: 1
ports:
- '82:3000'
networks:
- golang_microservices
logger-service:
container_name: logger-service
image: guillesaez15/golang_microservices_logger:latest
build:
context: ./logger-service
dockerfile: logger-service.dockerfile
restart: always
deploy:
mode: replicated
replicas: 1
networks:
- golang_microservices
mailhog:
container_name: mailhog
image: 'mailhog/mailhog:latest'
ports:
- '1025:1025'
- '8025:8025'
networks:
- golang_microservices
mail-service:
container_name: mail-service
image: guillesaez15/golang_microservices_mail:latest
build:
context: ./mail-service
dockerfile: ./mail-service.dockerfile
restart: always
deploy:
mode: replicated
replicas: 1
environment:
MAIL_DOMAIN: mailhog
MAIL_HOST: mailhog
MAIL_PORT: 1025
MAIL_ENCRYPTION: none
MAIL_USERNAME: ''
MAIL_PASSWORD: ''
FROM_NAME: 'Jhon Smith'
FROM_ADDRESS: 'john.smith@example.com'
networks:
- golang_microservices
listener-service:
container_name: listener-service
image: guillesaez15/golang_microservices_listener:latest
build:
context: ./listener-service
dockerfile: ./listener-service.dockerfile
restart: always
deploy:
mode: replicated
replicas: 1
networks:
- golang_microservices
rabbitmq:
container_name: rabbitmq
image: 'rabbitmq:3.9-alpine'
deploy:
mode: replicated
replicas: 1
ports:
- '5672:5672'
volumes:
- ./db-data/rabbitmq/:/var/lib/rabbitmq/
networks:
- golang_microservices
networks:
golang_microservices:
driver: bridge