1
0
mirror of https://github.com/quay/quay.git synced 2025-04-16 23:03:13 +03:00
quay/docker-compose.yaml
Ross Bryan b23a228225
chore: update local development clair to 4.7.2 (#2692)
Signed-off-by: Ross Bryan <robryan@redhat.com>
2024-02-26 09:28:39 -05:00

110 lines
2.6 KiB
YAML

version: "3.7"
volumes:
quay-db-data:
clair-db-data:
services:
quay-db:
user: postgres
container_name: quay-db
image: docker.io/library/postgres:12.1
environment:
POSTGRES_USER: "quay"
POSTGRES_PASSWORD: "quay"
POSTGRES_DB: "quay"
volumes:
- "./local-dev/init/pg_bootstrap.sql:/docker-entrypoint-initdb.d/pg_bootstrap.sql"
- "quay-db-data:/var/lib/postgresql/data"
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U quay -d quay"]
interval: 10s
timeout: 9s
retries: 3
start_period: 10s
clair-db:
user: postgres
container_name: clair-db
image: docker.io/library/postgres:12.1
command: -c 'max_connections=300'
environment:
POSTGRES_USER: "clair"
POSTGRES_DB: "clair"
volumes:
- "clair-db-data:/var/lib/postgresql/data"
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U clair -d clair"]
interval: 10s
timeout: 9s
retries: 3
start_period: 10s
cpus: 2
redis:
user: nobody
container_name: quay-redis
image: docker.io/library/redis:latest
ports:
- "6379:6379"
local-dev-frontend:
user: ${DOCKER_USER:-root}
container_name: quay-local-dev-frontend
build:
context: .
target: build-static
image: localhost/quay-build:latest
init: true
volumes:
- ".:/quay-registry"
working_dir: /quay-registry
environment:
npm_config_cache: /quay-registry/.npm
entrypoint:
- sh
- -c
- npm run watch
quay:
user: ${DOCKER_USER:-nobody:0}
container_name: quay-quay
build:
context: .
target: final
image: localhost/quay-local:latest
volumes:
- ".:/quay-registry"
- "./local-dev/stack:/quay-registry/conf/stack"
ports:
- "8080:8080"
- "8443:8443"
environment:
QUAY_VERSION: local-dev
QUAY_HOTRELOAD: "true"
DEBUGLOG: "true"
IGNORE_VALIDATION: "true"
QUAYRUN: /tmp
WORKER_COUNT_UNSUPPORTED_MINIMUM: "1"
WORKER_COUNT: "1"
# clair is configured to share it's network
# namespace with quay. this allows quay to serve
# layers to clair over localhost.
clair:
user: ${DOCKER_USER:-nobody:0}
container_name: quay-clair
image: quay.io/projectquay/clair:4.7.2
volumes:
- "./local-dev/clair:/src/clair/"
environment:
CLAIR_CONF: "/src/clair/config.yaml"
CLAIR_MODE: "combo"
network_mode: "service:quay"
cpus: 2
command:
["bash", "-c", "cd /src/clair/cmd/clair; go run -mod vendor ."]