-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
98 lines (91 loc) · 1.97 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
version: "3.9"
services:
msg:
build:
dockerfile: Dockerfile
context: .
target: api_prod
ports:
- 50051:50051
depends_on:
- database
- rabbitmq
restart: unless-stopped
volumes:
- .:/app
networks:
- backend
msg-message:
build:
dockerfile: Dockerfile
context: .
target: message_prod
ports:
- 50052:50052
depends_on:
- rabbitmq
restart: unless-stopped
volumes:
- .:/app
networks:
- backend
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: 'message-broker'
ports:
- 5672:5672
- 15672:15672
volumes:
- rmqdata:/var/lib/rabbitmq/
- rmqlogs:/var/log/rabbitmq
networks:
- backend
restart: always
environment:
- RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}
database:
image: postgres
restart: always
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- backend
migrate:
image: migrate/migrate
networks:
- backend
volumes:
- ./migrations:/migrations
command: ["-path", "/migrations", "-database", "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/${POSTGRES_DB}?sslmode=disable", "up"]
links:
- database
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
env_file:
- .env
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
PGADMIN_CONFIG_SERVER_MODE: ${PGADMIN_CONFIG_SERVER_MODE}
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "5050:80"
restart: unless-stopped
networks:
- backend
networks:
backend:
driver: bridge
volumes:
postgres:
pgadmin: