-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathdocker-compose-full.yml
More file actions
181 lines (168 loc) · 4.64 KB
/
docker-compose-full.yml
File metadata and controls
181 lines (168 loc) · 4.64 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# syntax=docker/dockerfile:1.4
# SPDX-FileContributor: Gaurav Mishra
# SPDX-FileCopyrightText: (C) 2026 Siemens AG
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
# SPDX-License-Identifier: EPL-2.0
# License-Filename: LICENSE
services:
sw360:
image: "ghcr.io/eclipse-sw360/sw360:${SW360_VERSION:-main}"
restart: unless-stopped
container_name: sw360
env_file: config/sw360/.env.backend
secrets:
- COUCHDB_SECRETS
- SW360_SECRETS
- JWT_KEYSTORE
depends_on:
- couchdb
ports:
- "8080:8080"
- "11311:11311"
networks:
- sw360net
stdin_open: true
tty: true
volumes:
- etc:/etc/sw360
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://localhost:8080/resource/api/health | grep -iq 'status\":\"up' || exit 1" ]
interval: 30s
timeout: 2s
retries: 3
start_period: 60s
couchdb-nouveau:
image: docker.io/library/couchdb:3.5-nouveau
restart: unless-stopped
container_name: couchdb_nouveau
volumes:
- ./config/couchdb/nouveau.yaml:/opt/nouveau/etc/nouveau.yaml
ports:
- "5987:5987"
- "5988:5988"
networks:
- sw360net
couchdb:
image: docker.io/library/couchdb:3.5
restart: unless-stopped
container_name: couchdb
env_file:
- ./config/couchdb/default_secrets # CouchDB does not support secrets
ports:
- "5984:5984"
networks:
- sw360net
depends_on:
- couchdb-nouveau
volumes:
- couchdb:/opt/couchdb/data
- ./config/couchdb/sw360_setup.ini:/opt/couchdb/etc/local.d/sw360_setup.ini
- ./config/couchdb/sw360_log.ini:/opt/couchdb/etc/local.d/sw360_log.ini
- ./config/couchdb/nouveau.ini:/opt/couchdb/etc/local.d/nouveau.ini
healthcheck:
test: [ "CMD-SHELL", "curl --fail -s http://couchdb:5984/_up" ]
interval: 30s
timeout: 5s
retries: 5
sw360-frontend:
build:
context: .
args:
NEXT_PUBLIC_SW360_API_URL: ${NEXT_PUBLIC_SW360_API_URL:-http://localhost:8080}
NEXT_PUBLIC_SW360_AUTH_PROVIDER: sw360basic
NEXTAUTH_URL: http://localhost
AUTH_SECRET: mysecret
image: "ghcr.io/eclipse-sw360/sw360-frontend:${SW360_FRONTEND_VERSION:-main}"
container_name: sw360-frontend
restart: unless-stopped
env_file:
- ./config/front-end/.env.frontend
ports:
- '3000:3000'
networks:
- sw360net
depends_on:
- sw360
keycloak:
image: "ghcr.io/eclipse-sw360/sw360/keycloak:26.5.5"
container_name: keycloak
restart: unless-stopped
env_file: ./config/keycloak/.env.keycloak
secrets:
- COUCHDB_SECRETS
# Uncomment following for development
# command:
# - start-dev --debug
depends_on:
- postgres
ports:
- "8533:8533"
networks:
- sw360net
healthcheck:
test: [ "CMD-SHELL", "curl --head -fsS http://localhost:9000/health/ready" ]
interval: 15s
timeout: 5s
retries: 5
start_period: 60s
# PG for KeyCloak
postgres:
image: docker.io/library/postgres:18.4-alpine
container_name: postgres
restart: unless-stopped
env_file: ./config/postgres/.env.postgres
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD
networks:
- sw360net
volumes:
- postgres_storage:/var/lib/postgresql
secrets:
- POSTGRES_PASSWORD
healthcheck:
test: [ "CMD-SHELL", "pg_isready --dbname $$POSTGRES_DB --username $$POSTGRES_USER" ]
interval: 10s
timeout: 5s
retries: 5
# Nginx reverse proxy
web:
image: docker.io/library/nginx:1.31.1-trixie
container_name: sw360_web
restart: unless-stopped
env_file: ./config/nginx/.env.web
volumes:
- ./config/nginx/rev_proxy.template:/etc/nginx/templates/default.conf.template:ro
- ./config/nginx/proxy_params:/etc/nginx/proxy_params:ro
command: >
/bin/bash -c "
apt-get update && apt-get install -y ssl-cert &&
nginx -g 'daemon off;'
"
ports:
# If ports changed, update nginx/proxy_params
- "443:443"
networks:
- sw360net
depends_on:
- sw360-frontend
- sw360
- keycloak
volumes:
couchdb: {}
etc: {}
postgres_storage: {}
networks:
sw360net:
name: sw360net
driver: bridge
secrets:
SW360_SECRETS:
file: ./config/sw360/default_secrets
COUCHDB_SECRETS:
file: ./config/couchdb/default_secrets
JWT_KEYSTORE:
file: ./config/sw360/jwt-keystore.jks
POSTGRES_PASSWORD:
file: ./config/postgres/postgresql_password