# {{ ansible_managed }}
---
version: '3'
services:
  vault:
    image: '{{ vault_container_image }}:{{ vault_version }}'
    container_name: '{{ vault_container_name }}'
    ports:
      - '{{ vault_port_http }}:{{ vault_port_http }}'
      - '{{ vault_port_https }}:{{ vault_port_https }}'
    volumes:
      - '{{ vault_config_output }}:/vault/config'
    environment:
      VAULT_DEV_ROOT_TOKEN_ID: '{{ vault_dev_root_token_id }}'
      SKIP_CHOWN: 1
  tinyproxy:
    image: '{{ proxy_container_image }}'
    container_name: '{{ proxy_container_name }}'
    ports:
      - '{{ proxy_port }}:{{ proxy_port }}'
    command: ANY
  mmock:
    image: '{{ mmock_container_image }}'
    container_name: '{{ mmock_container_name }}'
    ports:
      - '{{ mmock_server_port }}:{{ mmock_server_port }}'
      - '{{ mmock_console_port }}:{{ mmock_console_port }}'
    volumes:
      - '{{ mmock_config_path }}:/config'
    command: >-
      -console-port {{ mmock_console_port }}
      -server-port {{ mmock_server_port }}
  postgres:
    image: '{{ postgres_container_image }}'
    container_name: '{{ postgres_container_name }}'
    environment:
      POSTGRES_DB: '{{ postgres_db_name }}'
      POSTGRES_PASSWORD: '{{ postgres_db_password }}'
      POSTGRES_USER: '{{ postgres_db_user }}'
    ports:
      - '{{ postgres_sql_port }}:{{ postgres_sql_port }}'
    volumes:
      - '{{ postgres_config_path}}/init.sql:/docker-entrypoint-initdb.d/init.sql'
