-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from theredguild/docker-compose
[on-hold] use docker compose for our devcontainer
- Loading branch information
Showing
22 changed files
with
496 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
version: "3.7" | ||
# This is just to hold a bunch of yaml anchors and try to consolidate parts of | ||
# the config. | ||
x-anchors: | ||
postgres: &postgres-image docker.io/library/postgres:12 | ||
traefik: &traefik-image docker.io/library/traefik:v2.2 | ||
clair: &clair-image quay.io/projectquay/clair:4.8.0 | ||
|
||
services: | ||
clair-indexer: | ||
image: *clair-image | ||
container_name: clair-indexer | ||
depends_on: | ||
clair-database: | ||
condition: service_healthy | ||
environment: | ||
CLAIR_MODE: "indexer" | ||
volumes: | ||
- "./clair_config/local-dev/clair:/config:ro" | ||
networks: | ||
- toolbox-net | ||
|
||
clair-matcher: | ||
image: *clair-image | ||
container_name: clair-matcher | ||
depends_on: | ||
clair-database: | ||
condition: service_healthy | ||
environment: | ||
CLAIR_MODE: "matcher" | ||
volumes: | ||
- "./clair_config/local-dev/clair:/config:ro" | ||
networks: | ||
- toolbox-net | ||
|
||
clair-database: | ||
container_name: clair-database | ||
image: *postgres-image | ||
environment: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
volumes: | ||
- type: bind | ||
source: ./clair_config/local-dev/clair/init.sql | ||
target: /docker-entrypoint-initdb.d/init.sql | ||
healthcheck: | ||
test: | ||
- CMD-SHELL | ||
- "pg_isready -U postgres" | ||
interval: 5s | ||
timeout: 4s | ||
retries: 12 | ||
start_period: 10s | ||
networks: | ||
- toolbox-net | ||
|
||
clair-traefik: | ||
container_name: clair-traefik | ||
image: *traefik-image | ||
depends_on: | ||
- clair-matcher | ||
- clair-indexer | ||
ports: | ||
- '6060:6060' | ||
- '8080:8080' | ||
- '8443' | ||
- '5432' | ||
volumes: | ||
- './clair_config/local-dev/traefik/:/etc/traefik/:ro' | ||
networks: | ||
- toolbox-net | ||
|
||
networks: | ||
toolbox-net: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
quay.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
log_level: debug-color | ||
introspection_addr: ":8089" | ||
http_listen_addr: ":6060" | ||
updaters: | ||
sets: | ||
- ubuntu | ||
- debian | ||
- rhel-vex | ||
- alpine | ||
- osv | ||
auth: | ||
psk: | ||
key: 'c2VjcmV0' | ||
iss: | ||
- quay | ||
- clairctl | ||
indexer: | ||
connstring: host=clair-database user=clair dbname=indexer sslmode=disable | ||
scanlock_retry: 10 | ||
layer_scan_concurrency: 5 | ||
migrations: true | ||
matcher: | ||
indexer_addr: http://clair-indexer:6060/ | ||
connstring: host=clair-database user=clair dbname=matcher sslmode=disable | ||
max_conn_pool: 100 | ||
migrations: true | ||
matchers: {} | ||
notifier: | ||
indexer_addr: http://clair-indexer:6060/ | ||
matcher_addr: http://clair-matcher:6060/ | ||
connstring: host=clair-database user=clair dbname=notifier sslmode=disable | ||
migrations: true | ||
delivery_interval: 30s | ||
poll_interval: 1m | ||
webhook: | ||
target: "http://webhook-target/" | ||
callback: "http://clair-notifier:6060/notifier/api/v1/notification/" | ||
# amqp: | ||
# direct: true | ||
# exchange: | ||
# name: "" | ||
# type: "direct" | ||
# durable: true | ||
# auto_delete: false | ||
# uris: ["amqp://guest:guest@clair-rabbitmq:5672/"] | ||
# routing_key: "notifications" | ||
# callback: "http://clair-notifier/notifier/api/v1/notification" | ||
# tracing and metrics config | ||
trace: | ||
name: "jaeger" | ||
# probability: 1 | ||
jaeger: | ||
agent: | ||
endpoint: "clair-jaeger:6831" | ||
service_name: "clair" | ||
metrics: | ||
name: "prometheus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE USER clair WITH PASSWORD 'clair'; | ||
CREATE USER quay WITH PASSWORD 'quay'; | ||
CREATE DATABASE indexer WITH OWNER clair; | ||
CREATE DATABASE matcher WITH OWNER clair; | ||
CREATE DATABASE notifier WITH OWNER clair; | ||
CREATE DATABASE quay WITH OWNER quay; | ||
\connect matcher | ||
CREATE EXTENSION "uuid-ossp"; | ||
\connect notifier | ||
CREATE EXTENSION "uuid-ossp"; | ||
\connect quay | ||
CREATE EXTENSION "pg_trgm"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
http: | ||
entrypoint: | ||
clair: | ||
address: ':6060' | ||
routers: | ||
indexer: | ||
entryPoints: [clair] | ||
rule: 'PathPrefix(`/indexer`)' | ||
service: indexer | ||
matcher: | ||
entryPoints: [clair] | ||
rule: 'PathPrefix(`/matcher`)' | ||
service: matcher | ||
notifier: | ||
entryPoints: [clair] | ||
rule: 'PathPrefix(`/notifier`)' | ||
service: notifier | ||
services: | ||
indexer: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-indexer:6060/" | ||
healthCheck: | ||
path: /healthz | ||
port: 8089 | ||
matcher: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-matcher:6060/" | ||
healthCheck: | ||
path: /healthz | ||
port: 8089 | ||
notifier: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-notifier:6060/" | ||
healthCheck: | ||
path: /healthz | ||
port: 8089 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
http: | ||
routers: | ||
api: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/api`) || PathPrefix(`/dashboard`)' | ||
service: 'api@internal' | ||
dashboard-redirect: | ||
entryPoints: [traefik] | ||
rule: 'Path(`/`)' | ||
middlewares: [dashboard-redirect] | ||
service: 'api@internal' | ||
middlewares: | ||
dashboard-redirect: | ||
redirectRegex: | ||
regex: '.*' | ||
replacement: '${1}/dashboard/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
http: | ||
routers: | ||
grafana: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/grafana`)' | ||
service: grafana | ||
services: | ||
grafana: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-grafana:3000/" | ||
healthCheck: | ||
path: /grafana/api/health |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
http: | ||
routers: | ||
jaeger: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/jaeger`)' | ||
service: jaeger | ||
services: | ||
jaeger: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-jaeger:16686/" | ||
healthCheck: | ||
path: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
http: | ||
routers: | ||
pgadmin: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/pgadmin`)' | ||
service: pgadmin | ||
services: | ||
pgadmin: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-pgadmin/" | ||
healthCheck: | ||
path: /pgadmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
tcp: | ||
routers: | ||
postgresql: | ||
entryPoints: [postgresql] | ||
service: postgresql | ||
# Traefik docs say this hack is needed if not using TLS. | ||
rule: 'HostSNI(`*`)' | ||
services: | ||
postgresql: | ||
loadBalancer: | ||
servers: | ||
- address: 'clair-database:5432' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
http: | ||
routers: | ||
prom: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/prom`)' | ||
service: prom | ||
services: | ||
prom: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-prometheus:9090/" | ||
healthCheck: | ||
path: /prom/-/healthy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
http: | ||
routers: | ||
pyroscope: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/pyroscope`)' | ||
service: pyroscope | ||
middlewares: | ||
- pyroscope-stripprefix | ||
middlewares: | ||
pyroscope-stripprefix: | ||
stripPrefix: | ||
prefixes: | ||
- /pyroscope | ||
services: | ||
pyroscope: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-pyroscope:4040/" | ||
healthCheck: | ||
path: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
http: | ||
routers: | ||
quay: | ||
entryPoints: [quay] | ||
rule: 'PathPrefix(`/`)' | ||
service: quay | ||
quay-api: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/v2`)' | ||
service: quay | ||
services: | ||
quay: | ||
loadBalancer: | ||
passHostHeader: false | ||
servers: | ||
- url: "http://clair-quay:8080/" | ||
healthCheck: | ||
path: /health | ||
port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
http: | ||
routers: | ||
rabbitmq: | ||
entryPoints: [traefik] | ||
rule: 'PathPrefix(`/rabbitmq`)' | ||
middlewares: | ||
- rewrite-api | ||
- rewrite | ||
service: rabbitmq | ||
services: | ||
rabbitmq: | ||
loadBalancer: | ||
servers: | ||
- url: "http://clair-rabbitmq:15672/" | ||
healthCheck: | ||
path: / | ||
middlewares: | ||
rewrite-api: | ||
replacePathRegex: | ||
regex: '^/rabbitmq/api/(.*?)/(.*)' | ||
replacement: '/api/%2F/$2' | ||
rewrite: | ||
replacePathRegex: | ||
regex: '^/rabbitmq/(.*)$' | ||
replacement: '/$1' |
Oops, something went wrong.