---
services:
  libpostal:
    build:
      target: builder
    image: 'joaodubas/addressex:builder'
    profiles:
      - build
    hostname: libpostal
    init: true
    restart: unless-stopped
    entrypoint: sleep
    command: infinity
  search:
    image: 'getmeili/meilisearch:v1.9.0'
    hostname: meili
    restart: unless-stopped
    environment:
      MEILI_ENV: development
      MEILI_MASTER_KEY: &meili_master_key ${ADDRESSEX_MEILI_KEY:-59EDmQofBp8vGT8kMvJJADPHRWHEAsWzZjCCqBFpVeuBmC2kWgCiBEgG7vfZ3ArY}
    volumes:
      - 'meili_data:/meili_data'
    ports:
      - '${ADDRESSEX_MEILI_PORT:-7700}:7700'
  search_ui:
    image: 'riccoxie/meilisearch-ui:v0.6.16'
    hostname: search-ui
    init: true
    restart: unless-stopped
    ports:
      - '${ADDRESSEX_MEILI_UI_PORT:-24900}:24900'
  ex:
    build:
      target: elixir
    image: 'joaodubas/addressex:elixir'
    hostname: ex
    init: true
    restart: unless-stopped
    entrypoint: sleep
    command: infinity
  py:
    build:
      target: python
    image: 'joaodubas/addressex:python'
    hostname: py
    init: true
    restart: unless-stopped
    entrypoint: sleep
    command: infinity
  go:
    build:
      target: go
    image: 'joaodubas/addressex:go'
    hostname: go
    init: true
    restart: unless-stopped
    environment:
      MEILI_MASTER_KEY: *meili_master_key
    ports:
      - '9000:9000'
    entrypoint: sleep
    command: infinity

volumes:
  meili_data: {}
