Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep docker deploy #183

Merged
merged 5 commits into from
May 15, 2024
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
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
20 changes: 0 additions & 20 deletions Dockerfile.test

This file was deleted.

21 changes: 0 additions & 21 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
6 changes: 0 additions & 6 deletions config/gateway.config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
http: # remove http section in production environment
port: 8080
https:
port: 4444
tls:
default: # replace with real certificate in prod environment
key: "config/testServer.key"
cert: "config/testServer.crt"
admin:
port: 9876
host: localhost
Expand Down
6 changes: 0 additions & 6 deletions config/gateway.config.yml.v5
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
http: # remove http section in production environment
port: 8080
https:
port: 4444
tls:
default: # replace with real certificate in prod environment
key: "config/testServer.key"
cert: "config/testServer.crt"
admin:
port: 9876
host: localhost
Expand Down
5 changes: 3 additions & 2 deletions config/system.config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Core
db:
redis:
emulate: true
namespace: EG
namespace: '${REDIS_NAMESPACE:-EG}'
host: '${REDIS_HOST:-redis}'
port: '${REDIS_PORT:-6379}'

#plugins:
# express-gateway-plugin-example:
Expand Down
26 changes: 0 additions & 26 deletions config/system.config.yml.prod

This file was deleted.

26 changes: 0 additions & 26 deletions config/system.config.yml.test

This file was deleted.

27 changes: 0 additions & 27 deletions config/testRootCA.key

This file was deleted.

18 changes: 0 additions & 18 deletions config/testRootCA.pem

This file was deleted.

17 changes: 0 additions & 17 deletions config/testServer.crt

This file was deleted.

16 changes: 0 additions & 16 deletions config/testServer.csr

This file was deleted.

28 changes: 0 additions & 28 deletions config/testServer.key

This file was deleted.

6 changes: 0 additions & 6 deletions dev/config-leaktest/gateway.config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
http: # remove http section in production environment
port: 8080
https:
port: 4444
tls:
default: # replace with real certificate in prod environment
key: "config/testServer.key"
cert: "config/testServer.crt"
admin:
port: 9876
host: localhost
Expand Down
Loading
Loading