# ============================================================================= # Artifact Keeper - Getting Started Compose File # ============================================================================= # # This file is a STARTING POINT for running Artifact Keeper locally or # evaluating it in a non-production setting. It is NOT a production-ready # deployment. Credentials are hardcoded, volumes use the local driver, and # no resource limits or redundancy are configured. # # For production deployments, use this as a reference and adapt it to your # environment: swap in managed databases, external object storage, real TLS # certificates, secrets management, and appropriate resource constraints. # See: https://artifactkeeper.com/docs/deployment/ # # Container images are available from two registries: # ghcr.io (default): ghcr.io/artifact-keeper/artifact-keeper-{backend,web,openscap} # Docker Hub: artifactkeeper/{backend,web,openscap} # # To use Docker Hub instead, replace image references below. For example: # ghcr.io/artifact-keeper/artifact-keeper-backend:latest -> artifactkeeper/backend:latest # # Pin a specific release by setting ARTIFACT_KEEPER_VERSION in a .env file # alongside this compose file (e.g. ARTIFACT_KEEPER_VERSION=1.1.0). Omit the # "v" prefix. If unset, "latest" is used. # ============================================================================= services: # --------------------------------------------------------------------------- # PostgreSQL TLS certificates (init container) # --------------------------------------------------------------------------- # Generates self-signed certs so the backend connects to Postgres over TLS. # In production, replace this with certs issued by your internal CA or use a # managed database service that handles TLS for you. pg-certs: image: alpine:3.20 container_name: artifact-keeper-pg-certs entrypoint: ["/bin/sh", "-c"] command: - | if [ -f /certs/server.crt ]; then echo "pg-certs: certificates already exist, skipping" exit 0 fi apk add --no-cache openssl >/dev/null 2>&1 echo "pg-certs: generating self-signed certificates..." openssl genrsa -out /certs/ca.key 4096 openssl req -x509 -new -nodes -key /certs/ca.key -sha256 -days 365 \ -out /certs/ca.crt -subj "/CN=Artifact Keeper CA/O=Artifact Keeper/C=US" openssl genrsa -out /certs/server.key 2048 openssl req -new -key /certs/server.key \ -out /certs/server.csr -subj "/CN=postgres/O=Artifact Keeper/C=US" cat > /certs/server.ext <