mirror of
https://github.com/Cian-H/iform-invenio.git
synced 2026-08-17 00:42:49 +01:00
Uwsgi (#1)
* Update devenv * Added uv for python package management * Clean up gunicorn config artifacts * Scaffolded site * Fixed configuration for 13.0 * Added iform config/theme * Added agent contracts to allow for more automation of work in repo * Added a local rebuild command to justfile for development * Fixed deployment persistence issues * Site polish and deployment streamlining * Updated justfile to include production deployment commands * Fixed deployment bugs * Fixed local test commands
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
# 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
|
||||
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
|
||||
volumes:
|
||||
static_data:
|
||||
data:
|
||||
search_data:
|
||||
mq_data:
|
||||
cache_data:
|
||||
Reference in New Issue
Block a user