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.8'
# Workstation-only override for Docker/docker-compose.yml:
#
# docker compose -f Docker/docker-compose.yml -f Docker/docker-compose.dev.yml up -d
#
# which is what `make deploy` runs. It restores everything the base file leaves
# out because swarm rejects or ignores it:
#
# - nothing about the network: it is external in both files, and `make
# network` creates it locally with the bridge driver (overlay needs a
# swarm manager);
# - `container_name`, `restart` and `depends_on`, which `docker stack deploy`
# drops with an "Ignoring unsupported options" warning;
# - the ClickHouse `ulimits` (a swarm sets nofile through the daemon's
# default-ulimits, not through the stack file);
# - the two admin UIs and the infrastructure ports on the host, so the
# integration tests (`cargo test --workspace -- --ignored`) and a
# redis-cli/mongosh session can reach them.
#
# NEVER include this file in `docker stack deploy` (make deploy-swarm): compose
# profiles are not supported there, and the UIs ship default admin/password
# credentials.
#
# Images are pinned by immutable digest, same policy as the base file (#22).
services:
redis:
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
mongodb:
container_name: mongodb
restart: unless-stopped
ports:
- "27017:27017"
clickhouse:
container_name: clickhouse
restart: unless-stopped
ulimits:
nofile:
soft: 262144
hard: 262144
ports:
- "8123:8123" # HTTP interface
- "9000:9000" # Native client (TCP)
backend:
container_name: backend
restart: unless-stopped
depends_on:
- redis
- mongodb
- clickhouse
# MongoDB Express for web-based MongoDB management (optional)
mongo-express:
image: mongo-express:1.0.2@sha256:1b23d7976f0210dbec74045c209e52fbb26d29b2e873d6c6fa3d3f0ae32c2a64
container_name: mongo-express
restart: unless-stopped
ports:
- "8081:8081"
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_USERNAME:-admin}
- ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_PASSWORD:-password}
- ME_CONFIG_MONGODB_SERVER=mongodb
- ME_CONFIG_BASICAUTH_USERNAME=${MONGOEXPRESS_USERNAME:-admin}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGOEXPRESS_PASSWORD:-password}
networks:
- optionchain-network
depends_on:
- mongodb
# Redis Commander for web-based Redis management (optional)
redis-commander:
image: rediscommander/redis-commander:redis-commander-210@sha256:25f93c06111f8614e3ecc8df5c563272bb465459a2e08e7f5364b5fe4c14f87f
container_name: redis-commander
restart: unless-stopped
ports:
- "8082:8081"
environment:
- REDIS_HOSTS=local:redis:6379:0:${REDIS_PASSWORD:-password}
- HTTP_USER=${REDIS_COMMANDER_USER:-admin}
- HTTP_PASSWORD=${REDIS_COMMANDER_PASSWORD:-password}
networks:
- optionchain-network
depends_on:
- redis
networks:
optionchain-network:
# Same external network as the base file - a local engine just creates it
# with the bridge driver instead of overlay (`make network`).
external: true
name: ${OPTIONCHAIN_NETWORK:-optionchain-network}