-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (65 loc) · 2.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (65 loc) · 2.09 KB
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
# Self-hosting gh-stats.
#
# Runs the same three services and the same published images that gh-stats.com
# runs. Everything is optional except GITHUB_PAT and FETCHER_INTERNAL_TOKEN.
#
# cp .env.example .env # then put your PAT in it
# docker compose up -d --build
# open http://localhost:5002
#
# The production deploy uses deploy/compose.yml instead; this file is the
# stripped-down version for running it on your own box.
name: ghstats
x-fetcher-env: &fetcher-env
GITHUB_PAT: ${GITHUB_PAT:?set GITHUB_PAT in .env - see .env.example}
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?set FETCHER_INTERNAL_TOKEN in .env - any random string}
services:
fetcher:
build: ./fetcher
image: ghstats-fetcher:local
restart: unless-stopped
environment:
<<: *fetcher-env
GENERATOR_URL: http://generator:5002
volumes:
- ./data/fetcher:/app/data
fetcher-cron:
build: ./fetcher
image: ghstats-fetcher:local
restart: unless-stopped
command: ["python", "-m", "src.cron"]
environment: *fetcher-env
volumes:
- ./data/fetcher:/app/data
depends_on: [fetcher]
generator:
build: ./generator
image: ghstats-generator:local
restart: unless-stopped
environment: &generator-env
FETCHER_URL: http://fetcher:5001
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?set FETCHER_INTERNAL_TOKEN in .env - any random string}
volumes:
- ./data/generator:/app/data
ports:
- "${GHSTATS_PORT:-5002}:5002"
depends_on: [fetcher]
generator-worker:
build: ./generator
image: ghstats-generator:local
restart: unless-stopped
command: ["python", "-m", "src.worker"]
environment: *generator-env
volumes:
- ./data/generator:/app/data
depends_on: [generator]
edge:
build: ./edge
image: ghstats-edge:local
restart: unless-stopped
environment:
GENERATOR_URL: http://generator:5002
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?set FETCHER_INTERNAL_TOKEN in .env - any random string}
ports:
- "${GHSTATS_EDGE_PORT:-5003}:5003"
depends_on: [generator]