Skip to content

Replacing DataPusher with XLoader

Brett Jones edited this page Jul 7, 2023 · 9 revisions
  1. Update the docker-compose.yml file
version: "3"

volumes:
  ckan_storage:
  pg_data:
  solr_data:

services:
    
  ckan-xloader:
    container_name: ${XLOADER_CONTAINER_NAME}
    build:
      context: xloader/
      dockerfile: Dockerfile
      args:
        - TZ=${TZ}
    networks:
      - xloadernet
      - dbnet
      - solrnet
      - redisnet
    env_file:
      - .env
    depends_on:
      db:
        condition: service_healthy
      solr:
        condition: service_healthy
      redis:
        condition: service_healthy
    volumes:
      - ckan_storage:/var/lib/ckan
    ports:
      - "0.0.0.0:${XLOADER_PORT_HOST}:${XLOADER_PORT}"
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "-qO", "/dev/null", "http://xloader:5000"]

  db:
    container_name: ${POSTGRESQL_CONTAINER_NAME}
    build:
      context: postgresql/
    networks:
      - dbnet
    environment:
      - POSTGRES_USER
      - POSTGRES_PASSWORD
      - POSTGRES_DB
      - PGDATA
      - CKAN_DB_USER
      - CKAN_DB_PASSWORD
      - CKAN_DB
      - DATASTORE_READONLY_USER
      - DATASTORE_READONLY_PASSWORD
      - DATASTORE_DB
    volumes:
      - pg_data:/var/lib/postgresql/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
     
  solr:
    container_name: ${SOLR_CONTAINER_NAME}
    networks:
      - solrnet
    image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
    volumes:
      - solr_data:/var/solr
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8983/solr/"]

  redis:
    container_name: ${REDIS_CONTAINER_NAME}
    image: redis:${REDIS_VERSION}
    networks:
      - redisnet
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "redis-cli", "-e", "QUIT"]
    
networks:
  xloadernet:
  solrnet:
    internal: true
  dbnet:
    internal: true
  redisnet:
    internal: true
Clone this wiki locally