Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ COPY --chown=root:root --chmod=755 api ./api
RUN chown -R root:1000 /service/api/build/static/webapp && \
chmod -R 775 /service/api/build/static/webapp

ENV NODE_ENV=production
ENV NODE_PATH=/service/api/node_modules
USER 1000
ENTRYPOINT ["/bin/bash", "/service/api/docker-entrypoint.sh", "main"]
3 changes: 3 additions & 0 deletions scripts/build/helm/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- env:
- name: NODE_ENV
value: '{{ .Values.api.node_env | default "production" }}'
- name: LOG_LEVEL
value: '{{ .Values.api.log_level | default "info" }}'
- name: BUILDS_URL
Expand All @@ -38,3 +40,4 @@ spec:
resources: {}
restartPolicy: Always


3 changes: 3 additions & 0 deletions scripts/build/helm/templates/sentinel/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ spec:
spec:
containers:
- env:
- name: NODE_ENV
value: '{{ .Values.sentinel.node_env | default "production" }}'
- name: LOG_LEVEL
value: '{{ .Values.sentinel.log_level | default "info" }}'
- name: API_HOST
Expand All @@ -35,3 +37,4 @@ spec:
resources: {}
restartPolicy: Always
status: {}

9 changes: 6 additions & 3 deletions scripts/build/helm/tests/integration-k3d-values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ local_storage:
preExistingDiskPath-2: "{{{data_path}}}/srv2"
preExistingDiskPath-3: "{{{data_path}}}/srv3"

# API log level for integration tests
# API environment and log level for integration tests
api:
node_env: "development"
log_level: "debug"

# Sentinel log level for integration tests
# Sentinel environment and log level for integration tests
sentinel:
log_level: "debug"
node_env: "development"
log_level: "debug"

4 changes: 4 additions & 0 deletions scripts/build/helm/values/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ cht_image_tag: "{{cht_image_tag}}" # TEMPLATE: This is a template variable, not
api:
service:
type: ClusterIP # DEFAULT: Good default for internal services
node_env: "production" # DEFAULT: Node environment for API service
log_level: "info" # DEFAULT: Log level for API service

# Sentinel Service configuration
sentinel:
node_env: "production" # DEFAULT: Node environment for Sentinel service
log_level: "info" # DEFAULT: Log level for Sentinel service

# If images are cached, the same image tag will never be pulled twice. For development, this means that it's not
Expand All @@ -32,3 +34,5 @@ couchdb:
user: "medic" # DEFAULT: Good default
uuid: "<uuid>" # # REQUIRED: User must set this (Generate with uuidgen)
couchdb_node_storage_size: "<storage-size>" # REQUIRED: User must set this (e.g. "10Gi", "100Gi")


1 change: 1 addition & 0 deletions sentinel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ COPY ./shared-libs ./shared-libs
COPY node_modules/@medic ./node_modules/@medic
COPY sentinel ./sentinel

ENV NODE_ENV=production
ENV NODE_PATH=/service/sentinel/node_modules

ENTRYPOINT ["/bin/bash", "/service/sentinel/docker-entrypoint.sh", "main"]
2 changes: 2 additions & 0 deletions tests/cht-core-test.override.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
services:
api:
environment:
- "NODE_ENV=development"
- "LOG_LEVEL=debug"
sentinel:
environment:
- "NODE_ENV=development"
- "LOG_LEVEL=debug"
Loading