Giter VIP home page Giter VIP logo

docker-express-gateway's Introduction

About this Repo

This is the Git repo of the Docker official image for Express Gateway.

Release Process

The release process is documented on our Wiki Page

Using this docker image

Obtain a local copy of the image:

docker pull express-gateway

Basic usage

Run a container from the image:

docker run -d -p 88:8080 express-gateway

This starts a container and binds port 88 on your host to port 8080 in the container. You can now send requests to port 88. However, you have not configured any applications, routes, etc yet. You just started the default gateway as configured inside the docker image.

Keep configuration changes across container starts

In the container, the gateway configuration files are stored in /var/lib/eg/ . If you make changes to these they will be lost when the container is removed or restarted. To keep your configuration changes across container restarts, you must save them outside of the container.

Using plain docker containers (e.g. not docker services)

Start the container so that it mounts a volume to a host directory where the configuration files will exist. First, you should create a directory on your host where you want the configuration files to be stored. For example:

mkdir -p /apps

Next, copy the default configuration from the docker image to the host directory using something similar to

docker run -d --name default-eg express-gateway
docker cp default-eg:var/lib/eg /apps

Now, you should have the default configuration files in the /apps/eg directory on your host. After modifying these as you wish, start the docker container so that it uses these files for the gateway configuration. The configuration files saved in /apps/eg/ will persist across container restarts. Thanks to the express-gateway hot reload feature you can change several of these configuration settings and the gateway will pick them up without restarting the docker container.

docker run -d --name express-gateway -p 88:8080 -v /apps/eg:/var/lib/eg express-gateway

If you want to use the CLI to change the gateway configuration, start the docker container so it binds an admin port on the host to the admin port the gateway is using in the container. For example:

docker run -d --name express-gateway -p 88:8080 -p 9876:9876 -v /apps/eg:/var/lib/eg express-gateway

docker-express-gateway's People

Contributors

chieftinkerer avatar eg-bot avatar mwinters-stuff avatar xvincentx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.