forked from conbench/conbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (75 loc) · 2.84 KB
/
docker-compose.yml
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
version: "3.9"
services:
app:
build:
context: .
# Note that currently this Dockerfile defines the image that' used for
# Conbench production environments.
dockerfile: Dockerfile
command: ["gunicorn", "-c", "conbench/gunicorn-conf.py"]
ports:
# When using the default value `127.0.0.1::5000` (two colons) then the
# container-internal port 5000 will be dynamically mapped to a free port
# on the host, on the interface represented by 127.0.0.1. In that case,
# the command `docker-compose port app 5000` will return the port on the
# host. If a definite port on the host is required (which may of course
# fail if it's already in use), set the environment variable
# DCOMP_CONBENCH_HOST_PORT to e.g. 127.0.0.1:5000 (that tries to bind to
# port 5000 on the host).
- ${DCOMP_CONBENCH_HOST_PORT:-127.0.0.1:}:5000
# Do this when introducing separate HTTP server for serving metrics.
# - ${DCOMP_CONBENCH_METRICS_HOST_PORT:-127.0.0.1:}:8000
volumes:
- ${PWD}/_conbench-coverage-dir:/etc/conbench-coverage-dir
depends_on:
- dex
- db
environment:
APPLICATION_NAME: "local-dev-conbench"
DB_USERNAME: "postgres"
# From the docker-compose docs: "By default Compose sets up a single
# network for your app. Each container for a service joins the default
# network and is both reachable by other containers on that network, and
# discoverable by them at a hostname identical to the container name."
# That is why the DNS name `db` works.
DB_HOST: "db"
DB_PASSWORD: "postgres"
DB_NAME: "postgres"
DB_PORT: "5432"
FLASK_APP: "conbench"
FLASK_ENV: "development"
FLASK_DEBUG: "true"
REGISTRATION_KEY: "innocent-registration-key"
SECRET_KEY: "Person, woman, man, camera, TV"
# Default log level is INFO, change to DEBUG as needed.
# CONBENCH_LOG_LEVEL_STDERR: DEBUG
OAUTHLIB_INSECURE_TRANSPORT: 1
GOOGLE_CLIENT_ID: conbench-test-client
GOOGLE_CLIENT_SECRET: AnotherStaticSecret
CONBENCH_OIDC_ISSUER_URL: http://dex:5556/dex-for-conbench
CONBENCH_INTENDED_BASE_URL: http://127.0.0.1:5000/
GITHUB_API_TOKEN: $GITHUB_API_TOKEN
healthcheck:
test: "curl -sfS http://0.0.0.0:5000/api/ping/"
interval: 5s
timeout: 20s
retries: 5
dex:
image: dexidp/dex:v2.35.3
volumes:
- ${PWD}/conbench/tests/containers/dex/config.yml:/etc/dex/config.docker.yaml
ports:
- "127.0.0.1::5556"
db:
image: library/postgres:15.2-alpine
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 2s
timeout: 5s
retries: 5
ports:
- "127.0.0.1::5432"