2024-01-11 09:43:08 +01:00
|
|
|
# This is the full docker-compose.yml file for the Marginalia Search Engine.
|
|
|
|
#
|
|
|
|
# It starts all the services, including the GUI, the database, the query service,
|
|
|
|
# two nodes for demo purposes, as well as a bunch of peripheral services that are
|
|
|
|
# application specific.
|
|
|
|
#
|
|
|
|
|
2023-03-04 13:19:01 +01:00
|
|
|
x-svc: &service
|
|
|
|
env_file:
|
2023-03-04 14:24:38 +01:00
|
|
|
- "run/env/service.env"
|
2023-03-04 13:19:01 +01:00
|
|
|
volumes:
|
|
|
|
- conf:/wmsa/conf:ro
|
|
|
|
- model:/wmsa/model
|
2023-03-25 10:20:44 +01:00
|
|
|
- data:/wmsa/data
|
2023-10-15 18:38:30 +02:00
|
|
|
- logs:/var/log/wmsa
|
|
|
|
networks:
|
|
|
|
- wmsa
|
2024-01-01 17:16:29 +01:00
|
|
|
labels:
|
|
|
|
- "__meta_docker_port_private=7000"
|
2023-10-15 18:38:30 +02:00
|
|
|
x-p1: &partition-1
|
|
|
|
env_file:
|
|
|
|
- "run/env/service.env"
|
|
|
|
volumes:
|
|
|
|
- conf:/wmsa/conf:ro
|
|
|
|
- model:/wmsa/model
|
|
|
|
- data:/wmsa/data
|
2023-03-04 13:19:01 +01:00
|
|
|
- logs:/var/log/wmsa
|
2023-10-16 17:37:26 +02:00
|
|
|
- index-1:/idx
|
|
|
|
- work-1:/work
|
|
|
|
- backup-1:/backup
|
|
|
|
- samples-1:/storage
|
2023-03-04 13:19:01 +01:00
|
|
|
networks:
|
|
|
|
- wmsa
|
|
|
|
depends_on:
|
|
|
|
- mariadb
|
2023-10-15 18:38:30 +02:00
|
|
|
environment:
|
|
|
|
- "WMSA_SERVICE_NODE=1"
|
2023-10-16 17:37:26 +02:00
|
|
|
x-p2: &partition-2
|
|
|
|
env_file:
|
|
|
|
- "run/env/service.env"
|
|
|
|
volumes:
|
|
|
|
- conf:/wmsa/conf:ro
|
|
|
|
- model:/wmsa/model
|
|
|
|
- data:/wmsa/data
|
|
|
|
- logs:/var/log/wmsa
|
|
|
|
- index-2:/idx
|
|
|
|
- work-2:/work
|
|
|
|
- backup-2:/backup
|
|
|
|
- samples-2:/storage
|
|
|
|
networks:
|
|
|
|
- wmsa
|
|
|
|
depends_on:
|
2023-10-26 11:10:53 +02:00
|
|
|
mariadb:
|
|
|
|
condition: service_healthy
|
2023-10-16 17:37:26 +02:00
|
|
|
environment:
|
|
|
|
- "WMSA_SERVICE_NODE=2"
|
2023-03-04 13:19:01 +01:00
|
|
|
|
|
|
|
services:
|
2023-10-15 18:38:30 +02:00
|
|
|
index-service-1:
|
|
|
|
<<: *partition-1
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/index-service"
|
2023-10-15 18:38:30 +02:00
|
|
|
container_name: "index-service-1"
|
|
|
|
executor-service-1:
|
|
|
|
<<: *partition-1
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/executor-service"
|
2023-10-15 18:38:30 +02:00
|
|
|
container_name: "executor-service-1"
|
2023-10-16 17:37:26 +02:00
|
|
|
index-service-2:
|
|
|
|
<<: *partition-2
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/index-service"
|
2023-10-16 17:37:26 +02:00
|
|
|
container_name: "index-service-2"
|
|
|
|
executor-service-2:
|
|
|
|
<<: *partition-2
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/executor-service"
|
2023-10-16 17:37:26 +02:00
|
|
|
container_name: "executor-service-2"
|
2023-10-24 14:44:19 +02:00
|
|
|
query-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/query-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
container_name: "query-service"
|
2023-03-04 13:19:01 +01:00
|
|
|
search-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/search-service"
|
2023-03-04 13:19:01 +01:00
|
|
|
container_name: "search-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
expose:
|
|
|
|
- 80
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.search-service.rule=PathPrefix(`/`)"
|
|
|
|
- "traefik.http.routers.search-service.entrypoints=search"
|
|
|
|
- "traefik.http.routers.search-service.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.search-service.middlewares=add-public"
|
|
|
|
- "traefik.http.middlewares.add-xpublic.headers.customrequestheaders.X-Public=1"
|
|
|
|
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
2023-03-04 13:19:01 +01:00
|
|
|
assistant-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/assistant-service"
|
2023-03-04 13:19:01 +01:00
|
|
|
container_name: "assistant-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
expose:
|
|
|
|
- 80
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2023-10-25 14:50:21 +02:00
|
|
|
- "traefik.http.routers.assistant-service-screenshot.rule=PathPrefix(`/screenshot`)"
|
2023-11-02 15:47:18 +01:00
|
|
|
- "traefik.http.routers.assistant-service-screenshot.entrypoints=search,dating"
|
2023-10-25 14:50:21 +02:00
|
|
|
- "traefik.http.routers.assistant-service-screenshot.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.assistant-service-screenshot.middlewares=add-public"
|
|
|
|
- "traefik.http.routers.assistant-service-suggest.rule=PathPrefix(`/suggest`)"
|
|
|
|
- "traefik.http.routers.assistant-service-suggest.entrypoints=search"
|
|
|
|
- "traefik.http.routers.assistant-service-suggest.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.assistant-service-suggest.middlewares=add-public"
|
2023-10-24 14:44:19 +02:00
|
|
|
- "traefik.http.middlewares.add-xpublic.headers.customrequestheaders.X-Public=1"
|
|
|
|
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
2023-03-04 13:19:01 +01:00
|
|
|
api-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/api-service"
|
2023-03-04 13:19:01 +01:00
|
|
|
container_name: "api-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
expose:
|
|
|
|
- "80"
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.api-service.rule=PathPrefix(`/`)"
|
|
|
|
- "traefik.http.routers.api-service.entrypoints=api"
|
|
|
|
- "traefik.http.routers.api-service.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.api-service.middlewares=add-public"
|
|
|
|
- "traefik.http.middlewares.add-xpublic.headers.customrequestheaders.X-Public=1"
|
|
|
|
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
2023-03-04 13:19:01 +01:00
|
|
|
dating-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/dating-service"
|
2023-03-04 13:19:01 +01:00
|
|
|
container_name: "dating-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
expose:
|
|
|
|
- 80
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.dating-service.rule=PathPrefix(`/`)"
|
|
|
|
- "traefik.http.routers.dating-service.entrypoints=dating"
|
|
|
|
- "traefik.http.routers.dating-service.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.dating-service.middlewares=add-public"
|
|
|
|
- "traefik.http.middlewares.add-xpublic.headers.customrequestheaders.X-Public=1"
|
|
|
|
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
2023-03-04 13:19:01 +01:00
|
|
|
explorer-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/explorer-service"
|
2023-03-04 13:19:01 +01:00
|
|
|
container_name: "explorer-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
expose:
|
|
|
|
- 80
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.explorer-service.rule=PathPrefix(`/`)"
|
|
|
|
- "traefik.http.routers.explorer-service.entrypoints=explore"
|
|
|
|
- "traefik.http.routers.explorer-service.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.explorer-service.middlewares=add-public"
|
|
|
|
- "traefik.http.middlewares.add-xpublic.headers.customrequestheaders.X-Public=1"
|
|
|
|
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
2023-07-03 10:40:32 +02:00
|
|
|
control-service:
|
|
|
|
<<: *service
|
2023-11-16 21:12:55 +01:00
|
|
|
image: "marginalia/control-service"
|
2023-07-03 10:40:32 +02:00
|
|
|
container_name: "control-service"
|
2023-10-24 14:44:19 +02:00
|
|
|
expose:
|
|
|
|
- 80
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.control-service.rule=PathPrefix(`/`)"
|
|
|
|
- "traefik.http.routers.control-service.entrypoints=control"
|
|
|
|
- "traefik.http.routers.control-service.middlewares=add-xpublic"
|
|
|
|
- "traefik.http.routers.control-service.middlewares=add-public"
|
|
|
|
- "traefik.http.middlewares.add-xpublic.headers.customrequestheaders.X-Public=1"
|
|
|
|
- "traefik.http.middlewares.add-public.addprefix.prefix=/public"
|
2023-03-04 13:19:01 +01:00
|
|
|
mariadb:
|
2023-10-03 11:07:58 +02:00
|
|
|
image: "mariadb:lts"
|
2023-03-04 13:19:01 +01:00
|
|
|
container_name: "mariadb"
|
2023-03-04 14:24:38 +01:00
|
|
|
env_file: "run/env/mariadb.env"
|
2023-03-04 13:19:01 +01:00
|
|
|
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:3306:3306/tcp"
|
2023-10-26 11:10:53 +02:00
|
|
|
healthcheck:
|
|
|
|
test: mysqladmin ping -h 127.0.0.1 -u $$MARIADB_USER --password=$$MARIADB_PASSWORD
|
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 60
|
2023-03-04 13:19:01 +01:00
|
|
|
volumes:
|
|
|
|
- db:/var/lib/mysql
|
2023-03-25 15:26:17 +01:00
|
|
|
- "./code/common/db/src/main/resources/sql/current/:/docker-entrypoint-initdb.d/"
|
2023-03-04 13:19:01 +01:00
|
|
|
networks:
|
|
|
|
- wmsa
|
2023-10-24 14:44:19 +02:00
|
|
|
traefik:
|
|
|
|
image: "traefik:v2.10"
|
|
|
|
container_name: "traefik"
|
|
|
|
command:
|
|
|
|
#- "--log.level=DEBUG"
|
|
|
|
- "--api.insecure=true"
|
|
|
|
- "--providers.docker=true"
|
|
|
|
- "--providers.docker.exposedbydefault=false"
|
|
|
|
- "--entrypoints.search.address=:80"
|
|
|
|
- "--entrypoints.control.address=:81"
|
|
|
|
- "--entrypoints.api.address=:82"
|
|
|
|
- "--entrypoints.dating.address=:83"
|
|
|
|
- "--entrypoints.explore.address=:84"
|
2023-03-04 13:19:01 +01:00
|
|
|
ports:
|
|
|
|
- "127.0.0.1:8080:80"
|
2023-07-10 18:58:33 +02:00
|
|
|
- "127.0.0.1:8081:81"
|
2023-10-09 15:39:34 +02:00
|
|
|
- "127.0.0.1:8082:82"
|
2023-10-24 14:44:19 +02:00
|
|
|
- "127.0.0.1:8083:83"
|
|
|
|
- "127.0.0.1:8084:84"
|
|
|
|
- "127.0.0.1:8090:8080"
|
2023-03-04 13:19:01 +01:00
|
|
|
volumes:
|
2023-10-24 14:44:19 +02:00
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
2023-03-04 13:19:01 +01:00
|
|
|
networks:
|
|
|
|
- wmsa
|
2024-01-01 17:16:29 +01:00
|
|
|
prometheus:
|
|
|
|
image: "prom/prometheus"
|
|
|
|
container_name: "prometheus"
|
|
|
|
command:
|
|
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:8091:9090"
|
|
|
|
volumes:
|
|
|
|
- "./run/prometheus.yml:/etc/prometheus/prometheus.yml"
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
|
|
networks:
|
|
|
|
- wmsa
|
2023-03-04 13:19:01 +01:00
|
|
|
networks:
|
|
|
|
wmsa:
|
|
|
|
volumes:
|
|
|
|
db:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: run/db
|
2023-10-16 17:37:26 +02:00
|
|
|
logs:
|
2023-10-15 18:38:30 +02:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/logs
|
|
|
|
model:
|
2023-03-04 13:19:01 +01:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/model
|
|
|
|
conf:
|
2023-08-25 14:57:43 +02:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/conf
|
|
|
|
data:
|
2023-03-04 13:19:01 +01:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/data
|
|
|
|
samples-1:
|
2023-03-04 13:19:01 +01:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/node-1/samples
|
|
|
|
index-1:
|
2023-03-25 10:20:44 +01:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/node-1/index
|
|
|
|
work-1:
|
2023-07-11 17:08:43 +02:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/node-1/work
|
|
|
|
backup-1:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: run/node-1/backup
|
|
|
|
samples-2:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: run/node-2/samples
|
|
|
|
index-2:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: run/node-2/index
|
|
|
|
work-2:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: run/node-2/work
|
|
|
|
backup-2:
|
2023-07-11 17:08:43 +02:00
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
2023-10-16 17:37:26 +02:00
|
|
|
device: run/node-2/backup
|