Skip to content

Commit

Permalink
Merge remote-tracking branch 'GitHub/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	cytomine.template
  • Loading branch information
jgillardcytomine committed Oct 6, 2023
2 parents 30bb3c2 + e63c6d1 commit cb828f8
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 172 deletions.
75 changes: 75 additions & 0 deletions configs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Configuration overrides folder
For each service, you can override any file within the container.
## File override
Under this `configs/` folder, just recreate the folder structure of the file from the root filesystem path and place a file there.
Example: override the `/etc/nginx/cors_params` of the `nginx` service.
```
configs
└─ nginx <-- service name
└─ etc <-- /etc inside the container
└─ nginx
└─ cors_params <-- file
```

## File templating
Additionally, environment variables can be interpolated inside those files if they end with `.sample`.
For instance, `/etc/nginx/nginx.conf.sample` of the `nginx` service
```conf
...
server {
client_max_body_size 0;
listen 80;
server_name $URLS_CORE;
...
```
Will become `/etc/nginx/nginx.conf` with `$URLS_CORE` replaced by `cytomine.local`
```conf
...
server {
client_max_body_size 0;
listen 80;
server_name cytomine.local
...
```
# List of services and overrides examples
Here is a list of what can be defined in the `configs/` folder.
## core
Example:
```
configs
└─ core <-- service name
└─ app <-- /app inside the container
└─ logback.xml <-- file
```
See here what can be overridden https://github.com/cytomine/Cytomine-core-spring/blob/main/README.md#override-configuration

## nginx
Example:
```
configs
└─ nginx <-- service name
└─ etc <-- /etc inside the container
└─ nginx
└─ cors_params <-- file
```
See here what can be overridden https://github.com/cytomine/Cytomine-nginx/tree/main/cm_configs_default

## pims
Example:
```
configs
└─ pims <-- service name
└─ app <-- /app inside the container
└─ logging.xml <-- file
```
See here what can be overridden https://github.com/cytomine/pims

## web_ui
Example:
```
configs
└─ web_ui <-- service name
└─ app <-- /app inside the container
└─ configuration.json.sample <-- file
```
See here what can be overridden https://github.com/cytomine/Cytomine-Web-UI
165 changes: 0 additions & 165 deletions configs/nginx/etc/nginx/nginx.conf.sample

This file was deleted.

14 changes: 7 additions & 7 deletions cytomine.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# -------------------------------------------------- #
# -------------------------------------------------- #
# Update these to configure your instance
global:
urls:
Expand Down Expand Up @@ -36,13 +35,13 @@ global:
constant:
BIOFORMAT: cytomine/bioformat:v1.2.0
CORE: cytomine/core:4.4.0
MONGO: mongo:4.4.18-focal
NGINX: cytomine/nginx:1.22.1-1.2.0
MONGO: cytomine/mongo:0.1.0
NGINX: cytomine/nginx:2.0.0
PIMS_CACHE: redis:7.0.8
PIMS: cytomine/pims-ce-package:0.0.2
POSTGIS: cytomine/postgis:15-3.3-alpine-1.2.1
PIMS: cytomine/pims-ce-package:0.2.0
POSTGIS: cytomine/postgis:1.3.0
RABBITMQ: rabbitmq:3.10
WEB_UI: cytomine/web_ui:2.6.1
WEB_UI: cytomine/web_ui:2.6.2

internal_docker_urls: # must match respective container hostnames from compose file
constant:
Expand Down Expand Up @@ -113,6 +112,7 @@ global:
DICOM=DICOM.
MIRAX=MIRAX.
ICC_PROFILE=ICC_PROFILE.
OME=OME.

services:
default:
Expand Down

0 comments on commit cb828f8

Please sign in to comment.