You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
2.7 KiB
YAML
117 lines
2.7 KiB
YAML
services:
|
|
# MongoDB: Database
|
|
database:
|
|
image: mongo:6
|
|
restart: always
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: revolt
|
|
MONGO_INITDB_ROOT_PASSWORD: revolt
|
|
volumes:
|
|
- ./data/db:/data/db
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "-u", "revolt", "-p", "revolt", "--eval", "db.runCommand({ ping: 1 })"]
|
|
interval: 10s
|
|
timeout: 30s
|
|
retries: 5
|
|
start_period: 40s
|
|
|
|
# RabbitMQ
|
|
rabbit:
|
|
image: rabbitmq:4-management
|
|
restart: always
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: revolt
|
|
RABBITMQ_DEFAULT_PASS: revolt
|
|
volumes:
|
|
- ./data/rabbit:/var/lib/rabbitmq
|
|
healthcheck:
|
|
test: rabbitmq-diagnostics -q ping
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
# Redis (newly added)
|
|
redis:
|
|
image: redis:7
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 30s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
# MinIO
|
|
minio:
|
|
image: minio/minio
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- ./data/minio:/data
|
|
environment:
|
|
MINIO_ROOT_USER: revolt
|
|
MINIO_ROOT_PASSWORD: revolt-revolt
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
# Application services with build context
|
|
api:
|
|
build: ./api # Add path to Dockerfile
|
|
env_file: .env
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
rabbit:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy # Updated to healthy
|
|
|
|
autumn:
|
|
build: ./autumn # Add path to Dockerfile
|
|
env_file: .env
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
|
|
events:
|
|
build: ./events # Add path to Dockerfile
|
|
env_file: .env
|
|
|
|
web:
|
|
build: ./web # Add path to Dockerfile
|
|
env_file: .env
|
|
|
|
january:
|
|
build: ./january # Add path to Dockerfile
|
|
env_file: .env
|
|
|
|
crond:
|
|
build: ./crond # Add path to Dockerfile
|
|
env_file: .env
|
|
|
|
pushd:
|
|
build: ./pushd # Add path to Dockerfile
|
|
env_file: .env
|
|
|
|
# Create Buckets
|
|
createbuckets:
|
|
image: minio/mc # Required image added
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
until /usr/bin/mc alias set minio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD; do
|
|
echo 'Waiting for minio...'; sleep 5;
|
|
done;
|
|
/usr/bin/mc mb minio/revolt-uploads || true;
|
|
exit 0;
|
|
"
|
|
environment:
|
|
MINIO_ROOT_USER: revolt
|
|
MINIO_ROOT_PASSWORD: revolt-revolt |