Files
iform-invenio/i-form-data-repository/docker-compose.full.yml
T
2026-08-12 01:48:33 +01:00

137 lines
3.4 KiB
YAML

# Example of a full infrastructure stack
#
# Note, this file is not suitable for a production deployment. It is only an
# example of all the infrastructure components needed in a real production
# deployment.
#
# Usage::
#
# $ docker compose up -f docker-compose.full.yml -d
#
# Following services are included:
# - Frontend: Nginx (exposed ports: 40 and 443)
# - UI application: UWSGI (not exposed)
# - API application: UWSGI (not exposed)
# - Cache: Redis (exposed port: 6379)
# - DB: (PostgresSQL/MySQL) (exposed port: 5432 or 3306)
# - Message queue: RabbitMQ (exposed ports: 5672, 15672)
# - Search platform: (OpenSearch) (exposed ports: 9200, 9600)
# - OpenSearch Dashboard/Kibana (view OS/ES indexes) (exposed ports: 5601)
#
services:
cache:
extends:
file: docker-services.yml
service: cache
volumes:
- cache_data:/data
db:
extends:
file: docker-services.yml
service: db
volumes:
- data:/var/lib/postgresql/data
mq:
extends:
file: docker-services.yml
service: mq
volumes:
- mq_data:/var/lib/rabbitmq
search:
extends:
file: docker-services.yml
service: search
volumes:
- search_data:/usr/share/opensearch/data
opensearch-dashboards:
extends:
file: docker-services.yml
service: opensearch-dashboards
pgadmin:
extends:
file: docker-services.yml
service: pgadmin
s3:
extends:
file: docker-services.yml
service: s3
# Frontend
frontend:
extends:
file: docker-services.yml
service: frontend
volumes:
- static_data:/opt/invenio/var/instance/static
- ./docker/nginx/conf.d:/etc/nginx/conf.d:Z
- certbot_conf:/etc/letsencrypt
- certbot_www:/var/www/certbot
depends_on:
- web-ui
- web-api
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:8080:80"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:8443:443"
# UI Application
web-ui:
extends:
file: docker-services.yml
service: app
command: uwsgi /opt/invenio/var/instance/uwsgi_ui.ini
image: i-form-data-repository:latest
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5000:5000"
volumes:
- static_data:/opt/invenio/var/instance/static
# API Rest Application
web-api:
extends:
file: docker-services.yml
service: app
command: uwsgi /opt/invenio/var/instance/uwsgi_rest.ini
image: i-form-data-repository:latest
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5001:5000"
# Worker
worker:
extends:
file: docker-services.yml
service: app
command: celery -A invenio_app.celery worker --beat --loglevel=INFO
image: i-form-data-repository:latest
depends_on:
search:
condition: service_started
cache:
condition: service_started
db:
condition: service_started
mq:
condition: service_started
# Jobs scheduler
scheduler:
extends:
file: docker-services.yml
service: app
command: celery -A invenio_app.celery beat --scheduler invenio_jobs.services.scheduler:RunScheduler --loglevel=INFO
image: i-form-data-repository:latest
depends_on:
mq:
condition: service_started
db:
condition: service_started
certbot:
extends:
file: docker-services.yml
service: certbot
volumes:
static_data:
data:
search_data:
mq_data:
cache_data:
certbot_conf:
certbot_www: