aptly_setup-compose.yaml 1.04 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
# Docker compose file for getting aptly container up and running.
# This configuration was used in a successful setup of aptly and
# gitlab runners where both could successfully communicate within
# the same network over SSH to share new successfully built Hamara
# packages.

version: '3.6'

services:
  repo:
    image: smirart/aptly:latest
    hostname: aptly
    environment:
      FULL_NAME: "Hamara"
      EMAIL_ADDRESS: "admin@hamaralinux.org"
      GPG_PASSWORD: "gpgpasswordhere"
      HOSTNAME: aptly.hamaralinux.org
    ports:
      - target: 80
        published: 8000
      - target: 22
        published: 3222
    volumes:
      # As per the settings
      - /opt/hamara_repo_preliminary:/opt/aptly
    dns:
      - 8.8.8.8
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.hostname == node2
      resources:
        limits:
          cpus: '4.00'
          memory: '8192M'
      restart_policy:
        condition: on-failure
        max_attempts: 3
      update_config:
        delay: 2s