Skip to content

Proxy server Docker Stack file

Dmytro Titov edited this page Dec 2, 2020 · 2 revisions

docker-template.yml template file should be turned into docker-stack.yml file by removing all redundant for this setup microservices, filling in all the required env-vars, and injecting all the required secrets.

In the proxy context, we need only one secret, which is the server's SSL certificate (server.p12, see the corresponding page):

sudo docker secret create server.p12 /etc/letsencrypt/live/ega.elixir.no/server.p12

The complete docker-stack.yml file on a proxy server should look like this:

version: '3.3'

services:

  proxy:
    image: uiobmi/localega-tsd-proxy:latest
    ports:
      - 443:8080
    environment:
      - SERVER_CERT_PASSWORD=
      - CLIENT_ID=
      - CLIENT_SECRET=
      - BROKER_HOST=
      - BROKER_PORT=
      - BROKER_USERNAME=
      - BROKER_PASSWORD=
      - BROKER_VHOST=
      - BROKER_VALIDATE=
      - EXCHANGE=
      - CEGA_USERNAME=
      - CEGA_PASSWORD=
      - TSD_PROJECT=
      - TSD_ACCESS_KEY=
      - DB_INSTANCE=
      - POSTGRES_DB=
      - POSTGRES_USER=
      - POSTGRES_PASSWORD=
    secrets:
      - source: server.p12
        target: /etc/ega/ssl/server.cert
    volumes:
      - ./local-ega.github.io:/html

  interceptor:
    image: uiobmi/mq-interceptor:latest
    environment:
      - POSTGRES_CONNECTION=
      - CEGA_MQ_CONNECTION=
      - LEGA_MQ_CONNECTION=

secrets:
  server.p12:
    external: true

Everything after = in the environment sections should be filled with corresponding environment values.