|
| 1 | +version: '3' |
| 2 | + |
| 3 | +services: |
| 4 | + |
| 5 | + viz: |
| 6 | + image: portainer/portainer |
| 7 | + deploy: |
| 8 | + replicas: 1 |
| 9 | + placement: |
| 10 | + constraints: [node.role == manager] |
| 11 | + labels: |
| 12 | + - com.df.notify=true |
| 13 | + - com.df.distribute=true |
| 14 | + - com.df.serviceDomain=portainer.dogvs.cat |
| 15 | + - com.df.port=9000 |
| 16 | + networks: |
| 17 | + - proxy |
| 18 | + volumes: |
| 19 | + - /var/run/docker.sock:/var/run/docker.sock |
| 20 | + logging: |
| 21 | + driver: "gelf" |
| 22 | + options: |
| 23 | + gelf-address: "udp://127.0.0.1:18201" |
| 24 | + |
| 25 | +networks: |
| 26 | + proxy: |
| 27 | + external: true |
| 28 | + |
| 29 | + portus: |
| 30 | + build: . |
| 31 | + image: opensuse/portus:development |
| 32 | + command: bundle exec rails runner /srv/Portus/examples/development/compose/init.rb |
| 33 | + environment: |
| 34 | + - PORTUS_MACHINE_FQDN_VALUE=${MACHINE_FQDN} |
| 35 | + - PORTUS_PUMA_HOST=0.0.0.0:3000 |
| 36 | + - PORTUS_CHECK_SSL_USAGE_ENABLED=false |
| 37 | + - PORTUS_SECURITY_CLAIR_SERVER=http://clair:6060 |
| 38 | + |
| 39 | + - CCONFIG_PREFIX=PORTUS |
| 40 | + |
| 41 | + - PORTUS_DB_HOST=db |
| 42 | + - PORTUS_DB_PASSWORD=portus |
| 43 | + - PORTUS_DB_POOL=5 |
| 44 | + |
| 45 | + - RAILS_SERVE_STATIC_FILES=true |
| 46 | + ports: |
| 47 | + - 3000:3000 |
| 48 | + depends_on: |
| 49 | + - db |
| 50 | + links: |
| 51 | + - db |
| 52 | + volumes: |
| 53 | + - .:/srv/Portus |
| 54 | + |
| 55 | + background: |
| 56 | + image: opensuse/portus:development |
| 57 | + entrypoint: bundle exec rails runner /srv/Portus/bin/background.rb |
| 58 | + depends_on: |
| 59 | + - portus |
| 60 | + - db |
| 61 | + environment: |
| 62 | + - PORTUS_MACHINE_FQDN_VALUE=${MACHINE_FQDN} |
| 63 | + - PORTUS_SECURITY_CLAIR_SERVER=http://clair:6060 |
| 64 | + |
| 65 | + # Theoretically not needed, but cconfig's been buggy on this... |
| 66 | + - CCONFIG_PREFIX=PORTUS |
| 67 | + |
| 68 | + - PORTUS_DB_HOST=db |
| 69 | + - PORTUS_DB_PASSWORD=portus |
| 70 | + - PORTUS_DB_POOL=5 |
| 71 | + volumes: |
| 72 | + - .:/srv/Portus |
| 73 | + links: |
| 74 | + - db |
| 75 | + |
| 76 | + webpack: |
| 77 | + image: kkarczmarczyk/node-yarn:6.9-slim |
| 78 | + command: bash /srv/Portus/examples/development/compose/bootstrap-webpack |
| 79 | + working_dir: /srv/Portus |
| 80 | + volumes: |
| 81 | + - .:/srv/Portus |
| 82 | + |
| 83 | + clair: |
| 84 | + image: quay.io/coreos/clair:v2.0.2 |
| 85 | + restart: unless-stopped |
| 86 | + depends_on: |
| 87 | + - postgres |
| 88 | + links: |
| 89 | + - postgres |
| 90 | + ports: |
| 91 | + - "6060-6061:6060-6061" |
| 92 | + volumes: |
| 93 | + - /tmp:/tmp |
| 94 | + - ./examples/compose/clair/clair.yml:/clair.yml |
| 95 | + command: [-config, /clair.yml] |
| 96 | + |
| 97 | + db: |
| 98 | + image: library/mariadb:10.0.23 |
| 99 | + command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0 |
| 100 | + environment: |
| 101 | + MYSQL_ROOT_PASSWORD: portus |
| 102 | + |
| 103 | + postgres: |
| 104 | + image: library/postgres:10-alpine |
| 105 | + environment: |
| 106 | + POSTGRES_PASSWORD: portus |
| 107 | + |
| 108 | + registry: |
| 109 | + image: library/registry:2.6 |
| 110 | + environment: |
| 111 | + REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /registry_data |
| 112 | + REGISTRY_STORAGE_DELETE_ENABLED: "true" |
| 113 | + |
| 114 | + REGISTRY_HTTP_ADDR: 0.0.0.0:5000 |
| 115 | + REGISTRY_HTTP_DEBUG_ADDR: 0.0.0.0:5001 |
| 116 | + |
| 117 | + REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: /etc/docker/registry/portus.crt |
| 118 | + |
| 119 | + REGISTRY_AUTH_TOKEN_REALM: http://${MACHINE_FQDN}:3000/v2/token |
| 120 | + REGISTRY_AUTH_TOKEN_SERVICE: ${MACHINE_FQDN}:${REGISTRY_PORT} |
| 121 | + REGISTRY_AUTH_TOKEN_ISSUER: ${MACHINE_FQDN} |
| 122 | + |
| 123 | + REGISTRY_NOTIFICATIONS_ENDPOINTS: > |
| 124 | + - name: portus |
| 125 | + url: http://${MACHINE_FQDN}:3000/v2/webhooks/events |
| 126 | + timeout: 2000ms |
| 127 | + threshold: 5 |
| 128 | + backoff: 1s |
| 129 | + volumes: |
| 130 | + - /registry_data |
| 131 | + - ./examples/development/compose/portus.crt:/etc/docker/registry/portus.crt:ro |
| 132 | + ports: |
| 133 | + - ${REGISTRY_PORT}:5000 |
| 134 | + - 5001:5001 |
| 135 | + links: |
| 136 | + - portus |
0 commit comments