99 lines
2.7 KiB
YAML
99 lines
2.7 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Arti-API for management
|
|
arti-api:
|
|
build: .
|
|
container_name: arti-api
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- artifactory_data:/data
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
restart: unless-stopped
|
|
|
|
# Chart Museum with htpasswd authentication
|
|
chartmuseum:
|
|
image: chartmuseum/chartmuseum:latest
|
|
container_name: chartmuseum
|
|
environment:
|
|
# Storage configuration
|
|
- STORAGE=local
|
|
- STORAGE_LOCAL_ROOTDIR=/data/charts
|
|
- PORT=8080
|
|
|
|
# Authentication with htpasswd
|
|
- AUTH_ANONYMOUS_GET=false
|
|
- HTPASSWD_PATH=/data/htpasswd
|
|
- AUTH_REALM=Chart Museum
|
|
|
|
# Features
|
|
- ALLOW_OVERWRITE=true
|
|
- DISABLE_API=false
|
|
- DISABLE_METRICS=false
|
|
- LOG_JSON=true
|
|
- DEBUG=false
|
|
|
|
# CORS settings (optional)
|
|
- CORS_ALLOW_ORIGIN=*
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- artifactory_data:/data
|
|
depends_on:
|
|
arti-api:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
# Docker Registry with htpasswd authentication
|
|
registry:
|
|
image: registry:2
|
|
container_name: docker-registry
|
|
environment:
|
|
# Storage
|
|
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data/docker
|
|
|
|
# Authentication
|
|
- REGISTRY_AUTH=htpasswd
|
|
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
|
|
- REGISTRY_AUTH_HTPASSWD_PATH=/data/htpasswd
|
|
|
|
# Network
|
|
- REGISTRY_HTTP_ADDR=0.0.0.0:5000
|
|
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin=['*']
|
|
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods=['HEAD','GET','OPTIONS','DELETE']
|
|
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers=['Authorization','Accept','Cache-Control']
|
|
- REGISTRY_HTTP_HEADERS_Access-Control-Max-Age=[1728000]
|
|
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials=[true]
|
|
- REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers=['Docker-Content-Digest']
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
- artifactory_data:/data
|
|
depends_on:
|
|
arti-api:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5000/v2/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
volumes:
|
|
artifactory_data:
|
|
driver: local |