8 Commits

Author SHA1 Message Date
421260f297 💻 Added an amd64 compose file 2025-02-26 12:08:04 -05:00
df5c025d5a 📙 Updated README 2025-02-25 16:47:44 -05:00
c4a8b92a1d 🖼️ Updated UI port mapping 2025-02-25 16:32:21 -05:00
19d9542ee0 Merge branch 'master' of https://github.com/rishighan/threetwo-docker-compose 2025-02-25 16:11:12 -05:00
c3b2bcf80e 🔧 Added kafka 2024-06-03 17:22:44 -04:00
68e035ceb2 🐳 Updated docs 2024-05-17 10:50:11 -04:00
3633054091 🏗️ Added kafka and zookeeper 2024-05-10 22:55:05 -04:00
fecd97c222 🗺️ Added 5173 as the UI port 2024-04-11 10:53:32 -04:00
4 changed files with 210 additions and 9 deletions

View File

@@ -5,6 +5,8 @@ This repo contains the `docker-compose` files necessary to run:
1. ThreeTwo UI 1. ThreeTwo UI
2. `threetwo-core-service` and its dependencies 2. `threetwo-core-service` and its dependencies
3. `threetwo-metadata-service` and its dependencies 3. `threetwo-metadata-service` and its dependencies
4. `threetwo-acquisition-service` and its dependencies
5. `elasticsearch`, `kafka`, `zookeeper`, `mongo` and `redis`
### Pre-requisites ### Pre-requisites
@@ -24,12 +26,8 @@ You need 2 folders:
``` ```
- comics - comics
- userdata - userdata
|- covers
|- expanded
|- temporary
``` ```
#### ComicVine #### ComicVine
To get ComicVine to work for metadata scraping and other functions, you _must_ have a ComicVine API key. To get ComicVine to work for metadata scraping and other functions, you _must_ have a ComicVine API key.
@@ -49,12 +47,21 @@ You can get one [here.](https://comicvine.gamespot.com/api/) Metadata scraping w
1. Find the hostname of your machine and set the `UNDERLYING_HOSTNAME` to that. For e.g. `UNDERLYING_HOSTNAME=foo` 1. Find the hostname of your machine and set the `UNDERLYING_HOSTNAME` to that. For e.g. `UNDERLYING_HOSTNAME=foo`
2. Set the `COMICS_DIRECTORY` and `USERDATA_DIRECTORY` to the correct _absolute_ paths 2. Set the `COMICS_DIRECTORY` and `USERDATA_DIRECTORY` to the correct _absolute_ paths
3. Set the `COMICVINE_API` to your ComicVine API key 3. Set the `COMICVINE_API` to your ComicVine API key
4. To summarize, these are the only variables you need to configure:
```
UNDERLYING_HOSTNAME=myhost
COMICS_DIRECTORY=/path/to/comics
USERDATA_DIRECTORY=/path/to/userdata
COMICVINE_API_KEY=onethreetwo
```
4. Save the file 4. Save the file
5. Run the stack using: `env $(cat docker-compose.env | xargs) docker-compose up` 5. Run the stack using: `env $(cat docker-compose.env | xargs) docker-compose up`
### Ports ### Ports
1. `threetwo`, the UI runs on port `8050` 1. `threetwo`, the UI runs on port `5173`
2. `threetwo-core-service` service on `3000` 2. `threetwo-core-service` service on `3000`
3. `threetwo-metadata-service` service on `3080` 3. `threetwo-metadata-service` service on `3080`
@@ -65,4 +72,12 @@ General
1. Some common problems can be traced to out-of-date images, and as such can be mitigated by simply pruning orphaned images: `docker system prune -a` 1. Some common problems can be traced to out-of-date images, and as such can be mitigated by simply pruning orphaned images: `docker system prune -a`
2. Always check the logs of the offending service, `docker logs --follow <servicename>` 2. Always check the logs of the offending service, `docker logs --follow <servicename>`
3. Once the stack is up, assuming everything went well, look for `threetwo-ui` service's logs to see something like:
```
threetwo-ui | VITE v5.2.7 ready in 145 ms
threetwo-ui |
threetwo-ui | ➜ Local: http://localhost:5173/
threetwo-ui | ➜ Network: http://172.30.0.9:5173/
```

186
docker-compose.amd64.yml Normal file
View File

@@ -0,0 +1,186 @@
x-userdata-volume: &userdata-volume
type: bind
source: ${USERDATA_DIRECTORY:?USERDATA_DIRECTORY not set}
target: /userdata
x-comics-volume: &comics-volume
type: bind
source: ${COMICS_DIRECTORY:?COMICS_DIRECTORY not set}
target: /comics
services:
threetwo:
build:
context: https://github.com/rishighan/threetwo.git
dockerfile: Dockerfile
image: frishi/threetwo
container_name: threetwo-ui
env_file: /mnt/user/appdata/threetwo/docker-compose.env
restart: unless-stopped
ports:
- "5173:5173"
depends_on:
- core-services
- kafka1
- zoo1
- elasticsearch
- db
- redis
networks:
- proxy
metadata-service:
build:
context: https://github.com/rishighan/threetwo-metadata-service.git
image: frishi/threetwo-metadata-service
container_name: metadata-service
ports:
- "3080:3080"
environment:
SERVICES: api,comicvine
env_file: /mnt/user/appdata/threetwo/docker-compose.env
depends_on:
- redis
- kafka1
- zoo1
- elasticsearch
- db
volumes:
- *comics-volume
- *userdata-volume
networks:
- proxy
acquisition-service:
build:
context: https://github.com/rishighan/threetwo-acquisition-service.git
image: frishi/threetwo-acquisition-service
container_name: acquisition-service
ports:
- "3060:3060"
environment:
SERVICES: api,autodownload,comicProcessor,prowlarr,qbittorrent
env_file: /mnt/user/appdata/threetwo/docker-compose.env
depends_on:
- redis
- kafka1
- zoo1
- elasticsearch
- db
volumes:
- *comics-volume
- *userdata-volume
networks:
- proxy
core-services:
build:
context: https://github.com/rishighan/threetwo-core-service.git
image: frishi/threetwo-core-service
container_name: core-services
ports:
- "3000:3000"
- "3001:3001"
depends_on:
- db
- redis
- elasticsearch
- kafka1
- zoo1
environment:
name: core-services
SERVICES: api,library,importqueue,settings,search,socket,imagetransformation,opds
env_file: /mnt/user/appdata/threetwo/docker-compose.env
volumes:
- *comics-volume
- *userdata-volume
networks:
- proxy
db:
image: "mongo:latest" # Switched to amd64-compatible image
container_name: database
networks:
- proxy
ports:
- "27017:27017"
volumes:
- "mongodb_data:/data/db"
redis:
image: "redis:latest" # Using a safe amd64-supported version
container_name: queue
environment:
ALLOW_EMPTY_PASSWORD: "yes"
networks:
- proxy
ports:
- "6379:6379"
zoo1:
image: "zookeeper:3.7.0" # Switched from arm64v8 to standard amd64-compatible image
hostname: zoo1
container_name: zoo1
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_SERVERS: zoo1:2888:3888
networks:
- proxy
kafka1:
image: "bitnami/kafka:latest" # Ensures multi-arch support
hostname: kafka1
container_name: kafka1
ports:
- "9092:9092"
- "29092:29092"
- "9999:9999"
environment:
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_CFG_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CFG_ZOOKEEPER_CONNECT: zoo1:2181
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ZOOKEEPER_PROTOCOL: PLAINTEXT
KAFKA_CFG_BROKER_ID: 1
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_CFG_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_CFG_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_CFG_JMX_PORT: 9999
depends_on:
- zoo1
networks:
- proxy
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:7.17.26" # Using amd64-compatible image
container_name: elasticsearch
environment:
- "discovery.type=single-node"
- "xpack.security.enabled=false"
- "xpack.security.authc.api_key.enabled=false"
- "ES_JAVA_OPTS="
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
volumes:
- "elasticsearch:/usr/share/elasticsearch/data"
networks:
- proxy
networks:
proxy:
driver: bridge
volumes:
mongodb_data:
driver: local
elasticsearch:
driver: local

View File

@@ -3,8 +3,9 @@ UNDERLYING_HOSTNAME=localhost
COMICS_DIRECTORY=/Users/rishi/work/threetwo-core-service/comics COMICS_DIRECTORY=/Users/rishi/work/threetwo-core-service/comics
USERDATA_DIRECTORY=/Users/rishi/work/threetwo-core-service/userdata USERDATA_DIRECTORY=/Users/rishi/work/threetwo-core-service/userdata
COMICVINE_API_KEY=foobar COMICVINE_API_KEY=onethreetwo
CACHER=Memory
LOGGER=true LOGGER=true
LOGLEVEL=info LOGLEVEL=info
SERVICEDIR=dist/services SERVICEDIR=dist/services
@@ -16,4 +17,4 @@ ELASTICSEARCH_URI=http://elasticsearch:9200
KAFKA_BROKER_URI=kafka1:9092 KAFKA_BROKER_URI=kafka1:9092
REDIS_URI=redis://redis:6379 REDIS_URI=redis://redis:6379
TRANSPORTER=redis://redis:6379 TRANSPORTER=redis://redis:6379
CACHER=Memory

View File

@@ -18,8 +18,7 @@ services:
env_file: docker-compose.env env_file: docker-compose.env
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8050:8050" - "5173:5173"
- "3050:3050"
depends_on: depends_on:
- core-services - core-services
- kafka1 - kafka1