Files
iform-invenio/i-form-data-repository/docker-services.yml
T

144 lines
5.0 KiB
YAML

services:
app:
build:
context: ./
args:
- ENVIRONMENT=DEV
image: i-form-data-repository
env_file: ../.env
restart: "unless-stopped"
environment:
- "INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1"
- "INVENIO_BROKER_URL=amqp://guest:guest@mq:5672/"
- "INVENIO_CACHE_REDIS_URL=redis://cache:6379/0"
- "INVENIO_CACHE_TYPE=redis"
- "INVENIO_CELERY_BROKER_URL=amqp://guest:guest@mq:5672/"
- "INVENIO_CELERY_RESULT_BACKEND=redis://cache:6379/2"
- "INVENIO_COMMUNITIES_IDENTITIES_CACHE_REDIS_URL=redis://cache:6379/4"
- "INVENIO_SEARCH_HOSTS=['search:9200']"
- "INVENIO_SECRET_KEY=CHANGE_ME"
- "INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://${POSTGRES_USER:-i-form-data-repository}:${POSTGRES_PASSWORD:-i-form-data-repository}@db/${POSTGRES_DB:-i-form-data-repository}"
- "INVENIO_WSGI_PROXIES=1"
- "INVENIO_RATELIMIT_STORAGE_URL=redis://cache:6379/3"
- "INVENIO_S3_ACCESS_KEY_ID=${INVENIO_S3_ACCESS_KEY_ID}"
- "INVENIO_S3_SECRET_ACCESS_KEY=${INVENIO_S3_SECRET_ACCESS_KEY}"
- "INVENIO_THEME_IFORM_PRODUCTION=${INVENIO_THEME_IFORM_PRODUCTION:-false}"
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
frontend:
build:
context: ./docker/nginx/
dockerfile: Dockerfile
image: i-form-data-repository-frontend
env_file: ../.env
restart: "unless-stopped"
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:8080:80"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:8443:443"
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
cache:
image: docker.io/library/redis:7
restart: "unless-stopped"
read_only: true
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:6379:6379"
db:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.11-0
restart: "unless-stopped"
environment:
- "POSTGRES_USER=${POSTGRES_USER:-i-form-data-repository}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-i-form-data-repository}"
- "POSTGRES_DB=${POSTGRES_DB:-i-form-data-repository}"
- "PGBACKREST_REPO1_TYPE=s3"
- "PGBACKREST_REPO1_S3_BUCKET=${INVENIO_S3_BUCKET_NAME}"
- "PGBACKREST_REPO1_S3_ENDPOINT=${INVENIO_S3_ENDPOINT_URL}"
- "PGBACKREST_REPO1_S3_KEY=${INVENIO_S3_ACCESS_KEY_ID}"
- "PGBACKREST_REPO1_S3_KEY_SECRET=${INVENIO_S3_SECRET_ACCESS_KEY}"
- "PGBACKREST_REPO1_S3_REGION=${INVENIO_S3_REGION_NAME}"
- "PGBACKREST_REPO1_PATH=/backup/meta_db"
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5432:5432"
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
pgadmin:
image: docker.io/dpage/pgadmin4:6
restart: "unless-stopped"
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: "info@repo.i-form.ie"
PGADMIN_DEFAULT_PASSWORD: "i-form-data-repository"
volumes:
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
mq:
image: docker.io/library/rabbitmq:3-management
restart: "unless-stopped"
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:15672:15672"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5672:5672"
search:
image: docker.io/opensearchproject/opensearch:2.17.1
restart: "unless-stopped"
environment:
# settings only for development. DO NOT use in production!
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-guekxe3mvqieke1!%&ieIADE}"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
- "discovery.type=single-node"
- "cluster.routing.allocation.disk.threshold_enabled=false"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 2g
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:9200:9200"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:9600:9600"
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
opensearch-dashboards:
image: docker.io/opensearchproject/opensearch-dashboards:2.17.1
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5601:5601"
expose:
- "5601"
environment:
# settings only for development. DO NOT use in production!
- 'OPENSEARCH_HOSTS=["http://search:9200"]'
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
s3:
image: docker.io/minio/minio:RELEASE.2022-10-24T18-35-07Z
restart: "unless-stopped"
ports:
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:9000:9000"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:9001:9001"
environment:
MINIO_ROOT_USER: CHANGE_ME
MINIO_ROOT_PASSWORD: CHANGE_ME
volumes:
- ./data:/data
command: server /data --console-address :9001
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3