forked from rust-lang/docs.rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
106 lines (101 loc) · 2.95 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
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
version: "3"
services:
web:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile
platform: "linux/amd64"
depends_on:
- db
- s3
ports:
- "3000:3000"
# for metrics
expose: ["3000"]
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- ".rustwide-docker:/opt/docsrs/rustwide"
- "cratesio-index:/opt/docsrs/prefix/crates.io-index"
environment:
DOCSRS_RUSTWIDE_WORKSPACE: /opt/docsrs/rustwide
DOCSRS_DATABASE_URL: postgresql://cratesfyi:password@db
DOCSRS_STORAGE_BACKEND: s3
S3_ENDPOINT: http://s3:9000
AWS_ACCESS_KEY_ID: cratesfyi
AWS_SECRET_ACCESS_KEY: secret_key
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "localhost:3000"]
interval: 10s
timeout: 5s
retries: 10
db:
build:
context: ./dockerfiles
dockerfile: ./Dockerfile-postgres
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: cratesfyi
POSTGRES_PASSWORD: password
ports:
# Use a non-standard port on the host to avoid conflicting with existing postgres servers
- "15432:5432"
healthcheck:
test: ["CMD", "pg_isready", "--username", "cratesfyi"]
interval: 10s
timeout: 5s
retries: 10
s3:
image: minio/minio
entrypoint: >
/bin/sh -c "
mkdir -p /data/rust-docs-rs;
minio server /data --console-address ":9001";
"
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: cratesfyi
MINIO_ROOT_PASSWORD: secret_key
healthcheck:
test:
[
"CMD",
"curl",
"--silent",
"--fail",
"localhost:9000/minio/health/ready",
]
interval: 10s
timeout: 5s
retries: 10
prometheus:
build:
context: ./dockerfiles
dockerfile: ./Dockerfile-prometheus
ports:
- "9090:9090"
healthcheck:
test:
["CMD", "curl", "--silent", "--fail", "localhost:9090/-/ready"]
interval: 10s
timeout: 5s
retries: 10
gui_tests:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile-gui-tests
network_mode: "host"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- "${PWD}:/build/out"
volumes:
postgres-data: {}
minio-data: {}
cratesio-index: {}