Files
Myrient-Search-Engine/docker-compose.yml
2025-05-29 17:58:34 -06:00

72 lines
1.9 KiB
YAML

services:
myrient-search:
image: ghcr.io/alexankitty/myrient-search-engine:latest
ports:
- "8062:8062"
environment:
- PORT=8062
- BIND_ADDRESS=0.0.0.0
- FORCE_FILE_REBUILD=0
- DEBUG=0
- HOSTNAME=myrient.mahou.one
- NODE_ENV=production
- MAX_JOB_QUEUE=1000
- MAX_FETCH_JOBS=1000
- INSTANCE_NAME=Myrient
- EMULATOR_ENABLED=true
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=myrient
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=this-is-a-secure-db-password
- ELASTICSEARCH_URL=http://elasticsearch:9200
- TWITCH_CLIENT_ID=
- TWITCH_CLIENT_SECRET=
volumes:
- ./data:/usr/src/app/data
depends_on:
postgres:
condition: service_healthy
elasticsearch:
condition: service_healthy
restart: unless-stopped
elasticsearch:
image: elasticsearch:8.17.1
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\"\\|\"status\":\"yellow\"'"]
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
deploy: # Remove if you have a lot of free memory
resources:
limits:
memory: 1GB
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
restart: unless-stopped
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: this-is-a-secure-db-password
POSTGRES_DB: myrient
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
volumes:
elasticsearch_data:
postgres_data: