WSL/SLF GitLab Repository

docker-compose.yml 1.79 KB
Newer Older
Sam's avatar
Sam committed
1
2
3
4
5
6
7
version: "3"

volumes:
  ckan_storage:
  pg_data:
  solr_data:

Sam's avatar
Sam committed
8
9
10
11
networks:
  ckan-internal:
    external: true

Sam's avatar
Sam committed
12
13
14
services:
  ckan:
    container_name: ckan
Sam's avatar
Sam committed
15
    image: "${INTERNAL_REG}/ckan:${CKAN_VERSION}"
Sam's avatar
Sam committed
16
    build:
Sam's avatar
Sam committed
17
      context: .
Sam's avatar
Sam committed
18
      args:
19
20
        - EXTERNAL_REG=${EXTERNAL_REG}
        - PYTHON_VERSION=${PYTHON_VERSION}
Sam's avatar
Sam committed
21
22
        - CKAN_VERSION=${CKAN_VERSION}
        - MAINTAINER=${MAINTAINER}
Sam's avatar
Sam committed
23
24
    depends_on:
      - db
Sam's avatar
Sam committed
25
26
      - solr
      - redis
Sam's avatar
Sam committed
27
    ports:
Sam's avatar
Sam committed
28
29
30
      - "8989:5000"
    env_file:
      - .env
Sam's avatar
Sam committed
31
32
    volumes:
      - ckan_storage:/var/lib/ckan
33
      - ./ckan.ini:/home/ckan/ckan.ini
Sam's avatar
Sam committed
34
35
    networks:
      - ckan-internal
Sam's avatar
Sam committed
36
37

  db:
Sam's avatar
Sam committed
38
    container_name: ckan_db
Sam's avatar
Sam committed
39
    image: "${INTERNAL_REG}/ckan-db:latest"
40
41
42
43
44
    build:
      context: ./postgresql
      args:
        - EXTERNAL_REG=${EXTERNAL_REG}
        - MAINTAINER=${MAINTAINER}
Sam's avatar
Sam committed
45
    environment:
Sam's avatar
Sam committed
46
      - PGDATA=/var/lib/postgresql/data/db
47
48
    env_file:
      - .db.env
Sam's avatar
Sam committed
49
50
    volumes:
      - pg_data:/var/lib/postgresql/data
51
      - /etc/hosts:/etc/hosts:ro
Sam's avatar
Sam committed
52
53
    networks:
      - ckan-internal
Sam's avatar
Sam committed
54
    healthcheck:
55
      test: ["CMD", "pg_isready", "-U", "postgres"]
Sam's avatar
Sam committed
56
57

  solr:
Sam's avatar
Sam committed
58
    container_name: ckan_solr
Sam's avatar
Sam committed
59
    image: "${INTERNAL_REG}/ckan-solr:latest"
60
61
62
63
64
    build:
      context: ./solr
      args:
        - EXTERNAL_REG=${EXTERNAL_REG}
        - MAINTAINER=${MAINTAINER}
Sam's avatar
Sam committed
65
    volumes:
Sam's avatar
Sam committed
66
67
68
      - solr_data:/opt/solr/server/solr
    networks:
      - ckan-internal
Sam's avatar
Sam committed
69
70
71
72
73
74
75
76
77

  init-solr:
    container_name: ckan_init_solr
    image: "${INTERNAL_REG}/ckan-init-solr:latest"
    build:
      context: ./init_solr
      args:
        - EXTERNAL_REG=${EXTERNAL_REG}
        - MAINTAINER=${MAINTAINER}
78
79
    env_file:
      - .solr.env
Sam's avatar
Sam committed
80
81
82
83
    networks:
      - ckan-internal
    depends_on:
      - solr
Sam's avatar
Sam committed
84
85

  redis:
Sam's avatar
Sam committed
86
87
88
89
    container_name: ckan_redis
    image: redis:6.2
    networks:
      - ckan-internal