mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
140 lines
3.3 KiB
YAML
140 lines
3.3 KiB
YAML
version: "3.8"
|
|
name: knightcrawler
|
|
|
|
x-restart: &restart-policy "unless-stopped"
|
|
|
|
x-basehealth: &base-health
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
x-rabbithealth: &rabbitmq-health
|
|
test: rabbitmq-diagnostics -q ping
|
|
<<: *base-health
|
|
|
|
x-mongohealth: &mongodb-health
|
|
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
|
|
<<: *base-health
|
|
|
|
x-postgreshealth: &postgresdb-health
|
|
test: pg_isready
|
|
<<: *base-health
|
|
|
|
x-apps: &knightcrawler-app
|
|
depends_on:
|
|
mongodb:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
restart: *restart-policy
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
PGUSER: postgres # needed for healthcheck.
|
|
# # If you need the database to be accessible from outside, please open the below port.
|
|
# # Furthermore, please, please, please, change the username and password in the .env file.
|
|
# # If you want to enhance your security even more, create a new user for the database with a strong password.
|
|
# ports:
|
|
# - "5432:5432"
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
healthcheck: *postgresdb-health
|
|
restart: *restart-policy
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
mongodb:
|
|
image: mongo:latest
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
|
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
|
|
# # If you need the database to be accessible from outside, please open the below port.
|
|
# # Furthermore, please, please, please, change the username and password in the .env file.
|
|
# ports:
|
|
# - "27017:27017"
|
|
volumes:
|
|
- mongo:/data/db
|
|
restart: *restart-policy
|
|
healthcheck: *mongodb-health
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
rabbitmq:
|
|
image: rabbitmq:3-management
|
|
# # If you need the database to be accessible from outside, please open the below port.
|
|
# # Furthermore, please, please, please, look at the documentation for rabbit on how to secure the service.
|
|
# ports:
|
|
# - "5672:5672"
|
|
# - "15672:15672"
|
|
# - "15692:15692"
|
|
volumes:
|
|
- rabbitmq:/var/lib/rabbitmq
|
|
hostname: ${RabbitMqConfiguration__Host}
|
|
restart: *restart-policy
|
|
healthcheck: *rabbitmq-health
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
producer:
|
|
image: gabisonfire/knightcrawler-producer:latest
|
|
labels:
|
|
logging: "promtail"
|
|
env_file:
|
|
- .env
|
|
<<: *knightcrawler-app
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
consumer:
|
|
image: gabisonfire/knightcrawler-consumer:latest
|
|
env_file:
|
|
- .env
|
|
labels:
|
|
logging: "promtail"
|
|
deploy:
|
|
replicas: ${CONSUMER_REPLICAS}
|
|
<<: *knightcrawler-app
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
metadata:
|
|
image: gabisonfire/knightcrawler-metadata:latest
|
|
env_file:
|
|
- .env
|
|
labels:
|
|
logging: "promtail"
|
|
restart: no
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
addon:
|
|
image: gabisonfire/knightcrawler-addon:latest
|
|
ports:
|
|
- "7000:7000"
|
|
labels:
|
|
logging: "promtail"
|
|
env_file:
|
|
- .env
|
|
<<: *knightcrawler-app
|
|
networks:
|
|
- knightcrawler-network
|
|
|
|
networks:
|
|
knightcrawler-network:
|
|
driver: bridge
|
|
name: knightcrawler-network
|
|
|
|
volumes:
|
|
postgres:
|
|
mongo:
|
|
rabbitmq:
|