/
docker-compose.yml
81 lines (71 loc) · 1.78 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
version: '3.8'
services:
nsqlookupd:
image: nsqio/nsq
command: /nsqlookupd
ports:
- "4160:4160"
- "4161:4161"
nsqd:
image: nsqio/nsq
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 #--broadcast-address=host.docker.internal append this command if you want to run in your local physical machine(change host.docker.internal with localhost if you're on linux / mac)
depends_on:
- nsqlookupd
ports:
- "4150:4150"
- "4151:4151"
nsqadmin:
image: nsqio/nsq
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
depends_on:
- nsqlookupd
ports:
- "4171:4171"
mailhog:
image: mailhog/mailhog
ports:
- "8025:8025"
- "1025:1025"
postgresdb:
image: postgres:latest
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DBNAME}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_SSLMODE=${POSTGRES_SSLMODE}
- POSTGRES_TIMEZONE=${POSTGRES_TIMEZONE}
ports:
- 5432:5432
volumes:
- database_postgres:/var/lib/postgresql/data
networks:
- main_service_net
mongodb:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: user #change
MONGO_INITDB_ROOT_PASSWORD: password #change
mainservice:
build: main-service
ports:
- "8080:8080"
restart: on-failure
depends_on:
- postgresdb
smtpservice:
build: smtp-service
restart: on-failure
depends_on:
- mailhog
loggerservice:
build: log-service
depends_on:
- mongodb
restart: on-failure
volumes:
database_postgres:
networks:
main_service_net:
driver: bridge