🔧 Fixes

This commit is contained in:
2024-05-15 21:27:38 -05:00
parent 66f9d63b44
commit 03f6623ed0
3 changed files with 111 additions and 68 deletions

View File

@@ -1,58 +1,107 @@
version: "3.3"
x-userdata-volume: &userdata-volume
type: bind
source: ${USERDATA_DIRECTORY}
target: /userdata
x-comics-volume: &comics-volume
type: bind
source: ${COMICS_DIRECTORY}
target: /comics
services:
api:
core-services:
build:
context: .
image: threetwo-library-service
env_file: docker-compose.env
environment:
SERVICES: api
PORT: 3000
depends_on:
- nats
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
- "traefik.http.services.api-gw.loadbalancer.server.port=3000"
networks:
- internal
greeter:
build:
context: .
image: threetwo-library-service
env_file: docker-compose.env
environment:
SERVICES: greeter
depends_on:
- nats
networks:
- internal
nats:
image: nats:2
networks:
- internal
traefik:
image: traefik:v2.1
command:
- "--api.insecure=true" # Don't do that in production!
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
context: https://github.com/rishighan/threetwo-core-service.git
image: frishi/threetwo-core-service
container_name: core-services
ports:
- 3000:80
- 3001:8080
- "3000:3000"
- "3001:3001"
depends_on:
- db
- redis
- elasticsearch
- kafka
- zookeeper
environment:
name: core-services
SERVICES: api,library,jobqueue,settings,search,socket,imagetransformation,torrentjobs,opds
env_file: docker-compose.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- *comics-volume
- *userdata-volume
networks:
- internal
- default
- proxy
zookeeper:
image: zookeeper:latest
container_name: zookeeper
ports:
- "2181:2181"
networks:
- proxy
kafka:
image: apache/kafka:latest
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
networks:
- proxy
db:
image: "bitnami/mongodb:latest"
container_name: database
networks:
- proxy
ports:
- "27017:27017"
volumes:
- "mongodb_data:/bitnami/mongodb"
redis:
image: "bitnami/redis:latest"
container_name: redis
environment:
ALLOW_EMPTY_PASSWORD: "yes"
networks:
- proxy
ports:
- "6379:6379"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
container_name: elasticsearch
environment:
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "xpack.security.enabled=true"
- "xpack.security.authc.api_key.enabled=true"
- "ELASTIC_PASSWORD=password"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
networks:
- proxy
networks:
internal:
proxy:
external: true
volumes:
data:
mongodb_data:
driver: local
elasticsearch:
driver: local