Skip to content

Commit 21aa0d5

Browse files
Merge pull request #21 from ccdc-opensource/CSD-5638
Csd 5638
2 parents 47bb255 + ca11b15 commit 21aa0d5

File tree

2 files changed

+113
-5
lines changed

2 files changed

+113
-5
lines changed

docker-compose.sample-db-config.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
# - ServiceSettings__Databases__N__Colour=#FF0000
2929
# - ServiceSettings__Databases__N__Colour=red
3030
# - ServiceSettings__Databases__N__Colour=rgba(255, 0, 0, 0.5)
31-
31+
#
3232
# Example:
3333
# If you have a database called test-db at the location /usr/local/data/test-db.csdsqlx
3434
# To use the test-db.csdsqlx database the file will look like this
@@ -41,6 +41,34 @@ services:
4141
# - ServiceSettings__Databases__1__Name=test-db
4242
# - ServiceSettings__Databases__1__ConnectionString=/csd-data/test-db.csdsqlx
4343
# - ServiceSettings__Databases__1__Colour=red
44+
#
45+
# Structure File Links:
46+
# If you are using structure file links, include your .CSV file containg the mappings of links to structures
47+
# within the csd-data folder. See also section below for webcsd.
48+
#
49+
#########################################################################################################
50+
# Kubernetes Users
51+
# Please refer to the README regarding additional steps required for adding your in-house databases.
52+
#########################################################################################################
53+
54+
webcsd:
55+
volumes:
56+
- ./path/to/structure/files:/structure-files
57+
# Notes:
58+
# If you are not using structure file links, then ignore this section and do not include the above snippet in your
59+
# docker-compose file.
60+
#
61+
# If you are using structure file links, you need a .CSV file containing mappings of links to structures.
62+
# Place the .CSV file in your csd-data folder along with your in-house database files for webcsdbackend (see above).
63+
# When performing a docker-compose up, this will upload the file to the correct location.
64+
#
65+
# The associated files, that are linked to from the .CSV file, should be mapped to a folder in webcsd. Simply replace
66+
# the /path/to/structure/files in the example above with your local path where the structure files are stored.
67+
68+
#########################################################################################################
69+
# Kubernetes Users
70+
# Please refer to the README regarding additional steps required for implementing Structure File links.
71+
#########################################################################################################
4472

4573
webcsd-theory:
4674
volumes:
@@ -52,6 +80,16 @@ services:
5280
# 2. A CSD-Theory metadata database containing additional theoretical data. This must be name CSPDatabase.db.
5381
# These 2 database are used in conjunction to create the CSD-Theory charts and reports.
5482

83+
#########################################################################################################
84+
# Kubernetes Users
85+
# When converting to Kubernetes, only specify the second setting, for example:
86+
# webcsd-theory:
87+
# volumes:
88+
# - /path/to/CSD-Theory Landscape Database:/app/databases
89+
# This will create a persistent volume and claim for the location of the landscape database.
90+
# Please refer to the README regarding additional steps required for implementing CSD Theory.
91+
#########################################################################################################
92+
5593
# IMPORTANT: The CSD Search database must also be included in the webcsdbackend volumes.
5694
# The path in which the databases must be mounted is `/csd-data`.
5795
# For each database there must be 2 corresponding environment variables:

docker-compose.yml

+74-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
version: "3.6"
22

3+
x-labels: &k8s-labels
4+
kompose.image-pull-secret: pullsecret
5+
36
services:
47
webcsd:
58
environment:
@@ -13,7 +16,10 @@ services:
1316
- 80:80
1417
volumes:
1518
- ./userdata:/app/OnSite
16-
- ./structure-files:/structure-files
19+
labels:
20+
<<: *k8s-labels
21+
kompose.service.type: LoadBalancer
22+
kompose.service.expose: "true"
1723

1824
webcsdbackend:
1925
depends_on:
@@ -22,14 +28,24 @@ services:
2228
image: ccdcrepository.azurecr.io/webcsdbackend:0.1.6
2329
environment:
2430
- ServiceSettings__StructureInfoLocation=/csd-data/structure-links.csv
25-
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION};
31+
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION}
32+
labels:
33+
<<: *k8s-labels
34+
expose:
35+
- 80
2636

2737
redis:
38+
labels:
39+
<<: *k8s-labels
2840
image: redis
2941
restart: always
3042
command: redis-server --requirepass ${CSD_CACHE_PASSWORD}
43+
expose:
44+
- 6379
3145

3246
database-server:
47+
labels:
48+
<<: *k8s-labels
3349
image: ccdcrepository.azurecr.io/csd-database:2022.1.0.alpha2
3450
restart: always
3551
environment:
@@ -38,8 +54,12 @@ services:
3854
- "postgres"
3955
- "-c"
4056
- "max_connections=1000"
57+
expose:
58+
- 5432
4159

4260
ccdc-csd-substructuresearch:
61+
labels:
62+
<<: *k8s-labels
4363
image: ccdcrepository.azurecr.io/ccdc-csd-substructuresearch:0.1.6
4464
depends_on:
4565
- database-server
@@ -49,73 +69,123 @@ services:
4969
- ccdc-csd-deposition
5070
environment:
5171
- StructureSearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=substructure
72+
expose:
73+
- 80
5274

5375
ccdc-csd-deposition:
76+
labels:
77+
<<: *k8s-labels
5478
image: ccdcrepository.azurecr.io/ccdc-csd-deposition:0.1.6
5579
depends_on:
5680
- database-server
5781
environment:
5882
- CsdReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=csd_schema
83+
expose:
84+
- 80
5985

6086
ccdc-csd-textnumericsearch:
87+
labels:
88+
<<: *k8s-labels
6189
depends_on:
6290
- database-server
6391
image: ccdcrepository.azurecr.io/ccdc-csd-textnumericsearch:0.1.6
6492
environment:
6593
- CsdReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=csd_schema
94+
expose:
95+
- 80
6696

6797
ccdc-csd-searchservice:
98+
labels:
99+
<<: *k8s-labels
68100
depends_on:
69101
- ccdc-csd-textnumericsearch
70102
- ccdc-csd-substructuresearch
71103
- ccdc-csd-resultstore
72104
image: ccdcrepository.azurecr.io/ccdc-csd-searchservice:0.1.6
105+
expose:
106+
- 80
73107

74108
csd-request-entry:
109+
labels:
110+
<<: *k8s-labels
75111
depends_on:
76112
- ccdc-csd-deposition
77113
- ccdc-csd-crystal-structure-export
78114
- database-server
79115
image: ccdcrepository.azurecr.io/csd-request-entry:0.1.6
80116
environment:
81117
- CsdReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=csd_schema
118+
expose:
119+
- 80
82120

83121
ccdc-csd-formulasearch:
122+
labels:
123+
<<: *k8s-labels
84124
depends_on:
85125
- database-server
86126
image: ccdcrepository.azurecr.io/ccdc-csd-formulasearch:0.1.6
87127
environment:
88128
- FormulaSearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=formula
129+
expose:
130+
- 80
89131

90132
ccdc-csd-unitcellsearch:
133+
labels:
134+
<<: *k8s-labels
91135
depends_on:
92136
- database-server
93137
- ccdc-csd-reducedcell-calculation-service
94138
image: ccdcrepository.azurecr.io/ccdc-csd-unitcellsearch:0.1.6
95139
environment:
96140
- UnitCellSearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=unitcell
141+
expose:
142+
- 80
97143

98144
ccdc-csd-resultstore:
145+
labels:
146+
<<: *k8s-labels
99147
image: ccdcrepository.azurecr.io/ccdc-csd-resultstore:0.1.6
100148
environment:
101149
- OrderedCachePassword=${CSD_CACHE_PASSWORD}
150+
expose:
151+
- 80
102152

103153
ccdc-csd-fingerprint:
154+
labels:
155+
<<: *k8s-labels
104156
image: ccdcrepository.azurecr.io/ccdc-csd-fingerprint-service:0.1.6
157+
expose:
158+
- 80
105159

106160
ccdc-csd-substructure-filter:
161+
labels:
162+
<<: *k8s-labels
107163
image: ccdcrepository.azurecr.io/ccdc-csd-substructure-filter-service:0.1.6
164+
expose:
165+
- 80
108166

109167
ccdc-csd-crystal-structure-export:
168+
labels:
169+
<<: *k8s-labels
110170
image: ccdcrepository.azurecr.io/ccdc-csd-crystal-structure-export-service:0.1.6
171+
expose:
172+
- 80
111173

112174
ccdc-csd-reducedcell-calculation-service:
175+
labels:
176+
<<: *k8s-labels
113177
image: ccdcrepository.azurecr.io/ccdc-csd-reducedcell-calculation-service:0.1.6
178+
expose:
179+
- 80
114180

115181
webcsd-theory:
116-
image: ccdcrepository.azurecr.io/csd-theory:latest
182+
labels:
183+
<<: *k8s-labels
184+
image: ccdcrepository.azurecr.io/csd-theory:1.0.160
117185
environment:
118-
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION};
186+
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION}
187+
expose:
188+
- 80
119189

120190
volumes:
121191
csd_data: {}

0 commit comments

Comments
 (0)