forked from supplyshield/supplyshield
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 1.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (82 loc) · 1.78 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
services:
db:
image: postgres:15.5
env_file:
- docker.env
volumes:
- ./alembic/data/init.sql:/docker-entrypoint-initdb.d/init.sql
- db_data:/var/lib/postgresql/data
shm_size: "1gb"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U scancodeio"]
interval: 10s
retries: 5
restart: always
crons:
build:
dockerfile: Dockerfile.crons
env_file:
- docker.env
depends_on:
- db
restart: always
scancodeio:
build:
context: ./scancodeio/
dockerfile: Dockerfile
command: wait-for-it --strict --timeout=60 db:5432 -- sh -c "
./manage.py migrate &&
./manage.py collectstatic --no-input --verbosity 0 --clear &&
gunicorn scancodeio.wsgi:application --bind :8000 --timeout 600 --workers 8"
env_file:
- docker.env
ports:
- "8002:8000"
depends_on:
- db
- crons
volumes:
- static:/var/scancodeio/static/
web:
build:
dockerfile: Dockerfile
env_file:
- docker.env
ports:
- "8000:5000"
depends_on:
- scancodeio
metabase:
image: metabase/metabase:latest
container_name: metabase
hostname: metabase
volumes:
- /dev/urandom:/dev/random:ro
ports:
- 3000:3000
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: scancodeio
MB_DB_PORT: 5432
MB_DB_USER: scancodeio
MB_DB_PASS:
MB_DB_HOST: db
healthcheck:
test: curl --fail -I http://localhost:3000/api/health || exit 1
interval: 15s
timeout: 5s
retries: 5
depends_on:
- db
daemon:
build:
dockerfile: Dockerfile.daemon
env_file:
- docker.env
expose:
- "8001:8000"
depends_on:
- crons
volumes:
static:
db_data: