-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
110 lines (103 loc) · 2.59 KB
/
docker-compose.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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.4.0
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 ."]