-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
139 lines (126 loc) · 2.35 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
version: "3.9"
services:
api:
build:
context: .
target: prod
profiles:
- production
restart: always
image: ${API_IMAGE}
env_file:
- envs/database.env
- envs/authentication.env
- envs/message_service.env
- envs/message_listener.env
- envs/simple_storage.env
command: python main.py
volumes:
- "./src:/app/"
ports:
- 4000:8000
networks:
- nats-network
- mongo-network
- minio-network
k8s-test-image:
build:
context: .
target: dev
image: ${API_TEST_IMAGE}
container_name: spira-api-tester-1
entrypoint: python3
volumes:
- ".:/app/"
ports:
- 3000:8000
tester:
build:
context: .
target: dev
image: tester
container_name: spira-api-tester-1
profiles:
- test
depends_on:
- mongo
- minio
- nats-server
env_file:
- envs/database.env
- envs/authentication.env
- envs/message_service.env
- envs/message_listener.env
- envs/simple_storage.env
entrypoint: python3
volumes:
- ".:/app/"
ports:
- 3000:8000
networks:
- nats-network
- mongo-network
- minio-network
mongo:
image: mongo
restart: always
profiles:
- production
- test
env_file:
- envs/mongo.env
logging:
driver: "none"
networks:
- mongo-network
mongo-express:
image: mongo-express
restart: always
profiles:
- production
env_file:
- envs/mongo.env
logging:
driver: "none"
ports:
- 8081:8081
networks:
- mongo-network
nats-server:
image: nats:2.8.4
restart: always
profiles:
- production
- test
ports:
- 4222:4222
- 8222:8222
networks:
- nats-network
minio:
image: minio/minio
restart: always
profiles:
- production
- test
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ':9001' --address ':9000'
volumes:
- minio_data:/data
env_file:
- envs/minio.env
networks:
- minio-network
networks:
nats-network:
driver: bridge
name: nats-bridge
mongo-network:
name: mongo-bridge
minio-network:
driver: bridge
name: minio-bridge
volumes:
minio_data: