Compare commits
8 Commits
new-servic
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 421260f297 | |||
| df5c025d5a | |||
| c4a8b92a1d | |||
| 19d9542ee0 | |||
| c3b2bcf80e | |||
| 68e035ceb2 | |||
| 3633054091 | |||
| fecd97c222 |
25
README.md
25
README.md
@@ -5,6 +5,8 @@ This repo contains the `docker-compose` files necessary to run:
|
||||
1. ThreeTwo UI
|
||||
2. `threetwo-core-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
|
||||
@@ -24,12 +26,8 @@ You need 2 folders:
|
||||
```
|
||||
- comics
|
||||
- userdata
|
||||
|- covers
|
||||
|- expanded
|
||||
|- temporary
|
||||
```
|
||||
|
||||
|
||||
#### ComicVine
|
||||
|
||||
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`
|
||||
2. Set the `COMICS_DIRECTORY` and `USERDATA_DIRECTORY` to the correct _absolute_ paths
|
||||
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
|
||||
5. Run the stack using: `env $(cat docker-compose.env | xargs) docker-compose up`
|
||||
|
||||
### Ports
|
||||
|
||||
1. `threetwo`, the UI runs on port `8050`
|
||||
1. `threetwo`, the UI runs on port `5173`
|
||||
2. `threetwo-core-service` service on `3000`
|
||||
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`
|
||||
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
186
docker-compose.amd64.yml
Normal 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
|
||||
@@ -3,8 +3,9 @@ UNDERLYING_HOSTNAME=localhost
|
||||
COMICS_DIRECTORY=/Users/rishi/work/threetwo-core-service/comics
|
||||
USERDATA_DIRECTORY=/Users/rishi/work/threetwo-core-service/userdata
|
||||
|
||||
COMICVINE_API_KEY=foobar
|
||||
COMICVINE_API_KEY=onethreetwo
|
||||
|
||||
CACHER=Memory
|
||||
LOGGER=true
|
||||
LOGLEVEL=info
|
||||
SERVICEDIR=dist/services
|
||||
@@ -16,4 +17,4 @@ ELASTICSEARCH_URI=http://elasticsearch:9200
|
||||
KAFKA_BROKER_URI=kafka1:9092
|
||||
REDIS_URI=redis://redis:6379
|
||||
TRANSPORTER=redis://redis:6379
|
||||
CACHER=Memory
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ services:
|
||||
env_file: docker-compose.env
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8050:8050"
|
||||
- "3050:3050"
|
||||
- "5173:5173"
|
||||
depends_on:
|
||||
- core-services
|
||||
- kafka1
|
||||
|
||||
Reference in New Issue
Block a user