forked from Binja12/Bmail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
121 lines (113 loc) · 2.68 KB
/
Copy pathcompose.yml
File metadata and controls
121 lines (113 loc) · 2.68 KB
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
---
services:
mongo:
image: mongo:8-noble
# mutes logs spam by mongo
command: ["mongod", "--quiet", "--logpath", "/dev/null", "--auth", "--bind_ip_all"]
container_name: mongo
hostname: mongo
ports:
- 27017:27017
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
volumes:
- mongo-data:/data/db
networks:
- bmail
mongo-express:
image: mongo-express:1-20-alpine3.19
container_name: mongo-express
hostname: mongo-express
restart: unless-stopped
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
ME_CONFIG_BASICAUTH: false
networks:
- bmail
web-server:
image: node:24-bookworm
container_name: web-server
hostname: web-server
ports:
- "8080:8080"
restart: "no"
env_file:
- ./src/webServer/.env.prod
environment:
- NODE_ENV=prod
command: bash -c "
cd /app/src/webServer && \
npm install && \
npm start"
volumes:
- ./:/app/
depends_on:
bloom-filter:
condition: service_healthy
mongo:
condition: service_started
networks:
- bmail
bloom-filter:
build:
context: .
dockerfile: Dockerfile.server
container_name: bloom-filter
hostname: bloom-filter
restart: "no"
command: bash -c "
mkdir -p build/app && \
cd build/app && \
cmake ../.. && \
make && \
./bloom-filter 0.0.0.0 12345 8 1 2"
volumes:
- ./:/app
ports:
- "12345:12345"
healthcheck:
test: ["CMD", "bash", "-c", "test -f /tmp/tcp-server"]
interval: 1s
timeout: 10s
retries: 100
networks:
- bmail
bloom-filter-tests:
build:
context: .
dockerfile: Dockerfile.tests
container_name: bloom-filter-tests
hostname: bloom-filter-tests
restart: "no"
command: bash -c "
mkdir -p build/tests && \
cd build/tests && \
cmake ../../tests && \
make && \
./runTests"
volumes:
- ./:/app
python-client:
image: python:3-bookworm
container_name: python-client
hostname: python-client
restart: "no"
command: python /app/src/bloomFilter/tcpClient.py bloom-filter 12345
volumes:
- ./:/app/
depends_on:
bloom-filter:
condition: service_healthy
networks:
- bmail
networks:
bmail:
name: bmail
volumes:
mongo-data: