---
# docker-compose file for letsencrypt cert management

# DOCKER_HOST=dkhost01:2376 docker-compose up install
# DOCKER_HOST=dkhost01:2376 docker-compose up updates

# docker login dkregistry.xai-corp.net:5000
# docker-compose build && docker push dkregistry.xai-corp.net:5000/xaicorp/nextcloud:latest
# DOCKER_HOST=dkhost:2376 docker stack deploy -c docker-compose.yml services_letsencrypt

version: '3'
services:

  install:
    image: "blacklabelops/letsencrypt"
    container_name: letsencrypt_staging_install
    ports:
      - 80:80
#      - 443:443
    volumes:
      - /opt/shared/letsencrypt-2-staging:/etc/letsencrypt
    environment:
      LETSENCRYPT_HTTPS_ENABLED: "false"
      LETSENCRYPT_EMAIL: r_morgan@sympatico.ca
      LETSENCRYPT_DOMAIN1: xai-corp.net
      LETSENCRYPT_DOMAIN2: git.xai-corp.net
      LETSENCRYPT_DOMAIN3: xaibox.xai-corp.net
      LETSENCRYPT_DOMAIN4: dkui.xai-corp.net
      LETSENCRYPT_DOMAIN5: dkregistry.xai-corp.net
      LETSENCRYPT_DOMAIN6: fs.xai-corp.net
      LETSENCRYPT_DOMAIN7: jenkins.xai-corp.net
      LETSENCRYPT_DOMAIN8: sql.xai-corp.net
      LETSENCRYPT_DOMAIN9: office.xai-corp.net
      LETSENCRYPT_DOMAIN10: www.xai-corp.net
    command:
      - install
      - --staging
      - --expand

    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: none
      resources:
        limits:
          cpus: '0.1'
          memory: 256M
