Skip to content

Commit 33aa0e0

Browse files
authored
Enh/switch for studies access (#981)
- Normalizes .env-devel - Adds switch for studies access WEBSERVER_STUDIES_ACCESS_ENABLED - Removed cat from Makefile since it does not work in windows
1 parent 017b42f commit 33aa0e0

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.env-devel

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,46 @@ GF_SMTP_HOST=mail.speag.com:25
1313

1414
MAINTENANCE_PASSWORD=z43
1515

16-
PUBLISHED_HOST_NAME=localhost
17-
18-
POSTGRES_ENDPOINT=postgres:5432
19-
POSTGRES_USER=simcore
20-
POSTGRES_PASSWORD=simcore
2116
POSTGRES_DB=simcoredb
17+
POSTGRES_ENDPOINT=postgres:5432
18+
# ensure consistency with POSTGRES_ variables: postgresql+psycopg2://{user}:{password}@{host}:{port}/{database}
19+
POSTGRES_EXPORTER_DATA_SOURCE_NAME=postgresql://simcore:simcore@postgres:5432/simcoredb?sslmode=disable
2220
POSTGRES_HOST=postgres
21+
POSTGRES_PASSWORD=simcore
2322
POSTGRES_PORT=5432
23+
POSTGRES_USER=simcore
2424

25-
# ensure consistency with POSTGRES_ variables: postgresql+psycopg2://{user}:{password}@{host}:{port}/{database}
26-
POSTGRES_EXPORTER_DATA_SOURCE_NAME=postgresql://simcore:simcore@postgres:5432/simcoredb?sslmode=disable
25+
PUBLISHED_HOST_NAME=localhost
2726

28-
RABBIT_HOST=rabbit
29-
RABBIT_PORT=5672
3027
RABBITMQ_USER=simcore
28+
RABBITMQ_LOG_CHANNEL=comp.backend.channels.log
3129
RABBITMQ_PASSWORD=simcore
3230
RABBITMQ_PROGRESS_CHANNEL=comp.backend.channels.progress
33-
RABBITMQ_LOG_CHANNEL=comp.backend.channels.log
3431

35-
STORAGE_ENDPOINT=storage:8080
32+
RABBIT_HOST=rabbit
33+
RABBIT_PORT=5672
34+
3635

37-
REGISTRY_URL=masu.speag.com
3836
REGISTRY_AUTH=True
39-
REGISTRY_USER=z43
4037
REGISTRY_PW=z43
4138
REGISTRY_SSL=True
39+
REGISTRY_URL=masu.speag.com
40+
REGISTRY_USER=z43
41+
4242

43-
S3_ENDPOINT=minio:9000
4443
S3_ACCESS_KEY=12345678
45-
S3_SECRET_KEY=12345678
4644
S3_BUCKET_NAME=simcore
45+
S3_ENDPOINT=minio:9000
46+
S3_SECRET_KEY=12345678
4747
S3_SECURE=0
4848

49+
4950
SMTP_HOST=mail.speag.com
5051
SMTP_PORT=25
5152

53+
STORAGE_ENDPOINT=storage:8080
54+
5255
WEBSERVER_LOGIN_REGISTRATION_INVITATION_REQUIRED=1
5356
# python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key())"
5457
WEBSERVER_SESSION_SECRET_KEY=REPLACE ME with a key of at least length 32.
58+
WEBSERVER_STUDIES_ACCESS_ENABLED=0

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,11 @@ up-devel: up-swarm-devel
136136
up-swarm: .env docker-swarm-check
137137
${DOCKER} swarm init
138138
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose-tools.yml config > $(TEMPCOMPOSE).tmp-compose.yml ;
139-
@cat $(TEMPCOMPOSE).tmp-compose.yml
140139
@${DOCKER} stack deploy -c $(TEMPCOMPOSE).tmp-compose.yml ${SWARM_STACK_NAME}
141140

142141
up-swarm-devel: .env docker-swarm-check $(CLIENT_WEB_OUTPUT)
143142
${DOCKER} swarm init
144143
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.devel.yml -f services/docker-compose-tools.yml config > $(TEMPCOMPOSE).tmp-compose.yml
145-
@cat $(TEMPCOMPOSE).tmp-compose.yml
146144
@${DOCKER} stack deploy -c $(TEMPCOMPOSE).tmp-compose.yml ${SWARM_STACK_NAME}
147145

148146
.PHONY: up-webclient-devel

services/web/server/src/simcore_service_webserver/application_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def create_schema():
4545
"client_outdir": T.String(),
4646
"log_level": T.Enum(*logging._nameToLevel.keys()), # pylint: disable=protected-access
4747
"testing": T.Bool(),
48-
"studies_access_enabled": T.Bool(),
48+
T.Key("studies_access_enabled", default=False): T.Or(T.Bool(), T.Int),
4949
T.Key("monitoring_enabled", default=False): T.Or(T.Bool(), T.Int), # Int added to use environs
5050
}),
5151
db_config.CONFIG_SECTION_NAME: db_config.schema,

services/web/server/src/simcore_service_webserver/config/server-docker-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ main:
77
client_outdir: ${SIMCORE_WEB_OUTDIR}
88
log_level: ${WEBSERVER_LOGLEVEL}
99
testing: False
10-
studies_access_enabled: False
10+
studies_access_enabled: ${WEBSERVER_STUDIES_ACCESS_ENABLED}
1111
monitoring_enabled: ${WEBSERVER_MONITORING_ENABLED}
1212
director:
1313
host: ${DIRECTOR_HOST}

0 commit comments

Comments
 (0)