forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (85 loc) · 2.14 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
# FOSSology Docker Compose file
# SPDX-FileCopyrightText: © 2016 Siemens AG
# SPDX-FileCopyrightText: © fabio.huser@siemens.com
# SPDX-FileCopyrightText: © 2016-2017 TNG Technology Consulting GmbH
# SPDX-FileCopyrightText: © maximilian.huber@tngtech.com
#
# SPDX-License-Identifier: FSFAP
#
# Description: Recipe for setting up a multi container FOSSology
# Docker setup with separate Database instance
version: '3.5'
services:
scheduler:
build:
context: .
dockerfile: Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
image: fossology
restart: unless-stopped
environment:
- FOSSOLOGY_DB_HOST=db
- FOSSOLOGY_DB_NAME=fossology
- FOSSOLOGY_DB_USER=fossy
- FOSSOLOGY_DB_PASSWORD=fossy
command: scheduler
depends_on:
- db
volumes:
- repository:/srv/fossology/repository/
healthcheck:
test: ["CMD-SHELL", "true"]
interval: 5s
timeout: 5s
retries: 2
web:
build:
context: .
dockerfile: Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
image: fossology
restart: unless-stopped
environment:
- FOSSOLOGY_DB_HOST=db
- FOSSOLOGY_DB_NAME=fossology
- FOSSOLOGY_DB_USER=fossy
- FOSSOLOGY_DB_PASSWORD=fossy
- FOSSOLOGY_SCHEDULER_HOST=scheduler
command: web
ports:
- "8081:80"
depends_on:
- db
- scheduler
volumes:
- repository:/srv/fossology/repository/
healthcheck:
test: ["CMD-SHELL", "curl -sSf localhost/repo/api/v1/health | grep -q '{\"status\":\"OK\",' || exit 1"]
interval: 5s
timeout: 5s
retries: 5
db:
image: postgres:16
restart: unless-stopped
environment:
- POSTGRES_DB=fossology
- POSTGRES_USER=fossy
- POSTGRES_PASSWORD=fossy
- POSTGRES_INITDB_ARGS='-E SQL_ASCII'
volumes:
- database:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready --dbname $$POSTGRES_DB --username $$POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
# start-period: 10s
volumes:
database:
repository: