Skip to content

Commit

Permalink
Test and document EG_GATEWAY_CONFIG_PATH setting
Browse files Browse the repository at this point in the history
We no longer build different docker containers for the different ooapi
gateway versions.

To simulate the production use, we put the different
gateway.config.v*.yml files in ./test/config, which is mounted into
the docker image, and the file to be used is set by specifying the
EG_GATEWAY_CONFIG_PATH.
  • Loading branch information
joodie committed May 15, 2024
1 parent 30034c2 commit 4856e66
Show file tree
Hide file tree
Showing 11 changed files with 861 additions and 182 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!policies
!*.json
!*.js
!lib
!vendor
!config
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM node:18 AS build-env
COPY . /app
WORKDIR /app
RUN cp config/system.config.yml.prod config/system.config.yml
RUN rm -rf node_modules
RUN npm ci --only=production

FROM gcr.io/distroless/nodejs:18
Expand Down
18 changes: 0 additions & 18 deletions Dockerfile.test

This file was deleted.

19 changes: 0 additions & 19 deletions Dockerfile.test.v5

This file was deleted.

14 changes: 14 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,20 @@ brew:

To build the image

** Location of system.config and gateway.config files and docker mounts

The docker container does not contain a gateway configuration file.

By default, the gateway loads ~system.config.yml~ and
~gateway.config.yml~ from the ~./config~ directory. The ~./config~
directory contains additional model files that must be present.

To run the gateway in docker with a mutable configuration, it's
recommended to read-write mount a directory containing the gateway
configuration files and to set the ~EG_SYSTEM_CONFIG_PATH~ and
~EG_GATEWAY_CONFIG_PATH~ environment variables to point to the files
to use in that directory.

* Setting up development environment


Expand Down
Loading

0 comments on commit 4856e66

Please sign in to comment.