version: '3'
services:
  nginx-proxy:
    image: jwilder/nginx-proxy:alpine
    labels:
      - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./data/certs/:/etc/nginx/certs:ro
      - ./data/etc/nginx/vhost.d:/etc/nginx/vhost.d
      - ./data/usr/share/nginx/html:/usr/share/nginx/html
  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion:stable
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./data/certs/:/etc/nginx/certs
      - ./data/etc/nginx/vhost.d:/etc/nginx/vhost.d
      - ./data/usr/share/nginx/html:/usr/share/nginx/html
  app:
    build: .
    expose:
      - 3000
    depends_on:
    - database
    environment:
      config: /usr/local/config/local.edn
      VIRTUAL_HOST: local.app.integreatconsult.com
  database:
    image: postgres:9-alpine
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: ap
      POSTGRES_PASSWORD: fifteen-invoices-imported!
      POSTGRES_DB: autoap
    volumes:
      - ./data/var/lib/postgresql/data:/var/lib/postgresql/data
  migrator:
    build: ./migrator
    depends_on:
      - database
    environment:
      DATABASE_URL: "postgresql://ap:fifteen-invoices-imported!@database/autoap?ssl=false"


