apiVersion: batch/v1
kind: Job
metadata:
  name: initialise-job
spec:
  template:
    metadata:
      labels:
        component: initialise
    spec:
      containers:
        - name: initialise
          image: ${DOCKER_USER}/servers:${BUILD_VERSION}
          env:
            - name: BROKER_HOST
              value: broker
            - name: BROKER_PORT
              value: '5672'
            - name: EVENTSTORE_HOST
              value: eventstore
            - name: EVENTSTORE_PORT
              value: '1113'
          command:
            ['sh', '-c', 'dotnet ./Adaptive.ReactiveTrader.Server.Launcher.dll config.prod.json --populate-eventstore']
      restartPolicy: OnFailure
      
