GithubHelp home page GithubHelp logo

unleash / unleash-docker Goto Github PK

View Code? Open in Web Editor NEW
95.0 15.0 100.0 750 KB

Docker container for unleash

Home Page: https://docs.getunleash.io

License: Apache License 2.0

Dockerfile 1.46% Shell 98.54%
unleash-server feature-toggles feature-flags feature-management docker

unleash-docker's Introduction

Unleash in Docker compose

This repo contains a docker compose file and an extended dockerfile for running the Unleash server. The docker compose file will start a database, the Unleash server, and an Unleash proxy.

The extended Unleash dockerfile is very small shim on top of unleash/unleash to include wait-for and allow the docker-compose configuration to ensure that we're not starting Unleash until the database is up and running.

Docker-compose

  1. Clone the unleash-docker repository.
  2. Run docker-compose build in repository root folder.
  3. Run docker-compose up in repository root folder.

Useful links:

User accounts

  • Once started up, you'll have a user with
    • username: admin
    • password: unleash4all

Work locally with this repo

Start by cloning this repository.

We have set up docker-compose to start postgres and the unleash server together. This makes it really fast to start up unleash locally without setting up a database or node.

$ docker-compose build
$ docker-compose up

On some computers the database won't start in time for Unleash the first time you run this. If Unleash fails to reach the database, docker-compose restart web usually resolves the issue.

Requirements

We are using docker-compose version 3.9 and it requires:

  • Docker engine 19.03.0+
  • Docker compose 2.0.0+

For more info, check out the compatibility matrix on Docker's website: compatibility-matrix

unleash-docker's People

Contributors

aledeg avatar chriswk avatar dependabot[bot] avatar elhoyos avatar fredrikoseberg avatar gabel avatar gardleopard avatar hmert avatar ivarconr avatar jhult avatar joschi avatar mikesir87 avatar monotek avatar normanhh3 avatar sgerrand avatar theneva avatar thomasheartman avatar timpeeters avatar yunxianghuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unleash-docker's Issues

export issue when specifying yaml as in the documentation

I followed the documentation for exporting yaml through the admin api

http://localhost:33616/api/admin/state/export?format=json&featureToggles=1

but it gives me the following error:

[2020-07-30T19:53:35.619] [ERROR] /admin-api/state.js - Server failed executing request YAMLException: unacceptable kind of an object to dump [object Undefined]
    at writeNode (/node_modules/js-yaml/lib/js-yaml/dumper.js:779:13)
    at writeBlockMapping (/node_modules/js-yaml/lib/js-yaml/dumper.js:657:10)
    at writeNode (/node_modules/js-yaml/lib/js-yaml/dumper.js:750:9)
    at dump (/node_modules/js-yaml/lib/js-yaml/dumper.js:840:7)
    at Object.safeDump (/node_modules/js-yaml/lib/js-yaml/dumper.js:846:10)
    at StateController.export (/node_modules/unleash-server/lib/routes/admin-api/state.js:72:44) {
  reason: 'unacceptable kind of an object to dump [object Undefined]',
  mark: undefined
}

json export works as expected.

Security Warnings and Deprecated Dependencies

Hi Folks,

No stones to throw here, I'm checking out Unleash via this docker image and noticed (the 2nd or 3rd time I started it up!) that there were a number of warnings on build that seemed important.

npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN notice [SECURITY] hoek has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] timespan has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=timespan&version=2.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] sshpk has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=sshpk&version=1.13.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] tough-cookie has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=tough-cookie&version=2.3.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] stringstream has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=stringstream&version=0.0.5 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] mime has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=mime&version=1.3.6 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=4.17.4 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] base64url has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=base64url&version=2.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] tunnel-agent has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=tunnel-agent&version=0.4.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.

By chance are these issues addressed in an upcoming version?

How can I help?

Automated Docker Hub image

Since this project doesn't need to build the actual project and is simply used to create the Docker image, you can easily take advantage of Docker Hub's automated build processes. I use this for several projects and it's super easy (and nice). Any push to the repo would automatically trigger a build and automatic push to Docker Hub. Tags in the repo end up being tags on the final image too.

Info: https://docs.docker.com/docker-hub/builds/

Create user accounts using docker-compose

Hello, I'd like to evaluate unleashed and have spun up a local instance but it is not clear how to create user accounts. Do you have any guidance here? I am happy to submit a PR to the readme with the solution (even if that is just 'look at the docs here').

thanks!

Versions could be lifted automatically and Git tags could be pushed

Describe the feature request

The Unleash version lifts in this repository could be automated, including automated Git tag creation. Tags haven't been pushed for a while already. Doing this by hand can be tedious 😄

Background

No response

Solution suggestions

No response

Startup import

Hi,

Is it possible to use startup import with Docker image?

Tried to define IMPORT_FILE environment variable with path to export.yml but variable doesn't seem to be used.

Thanks

Run on other port than 4242

An option to pass environment variable (e.g. SERVER_PORT) to run unleash on a different port than 4242 (e.g. 80) would be awesome.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Latest image fails to start

Hiya,

The latest image release (as of time of writing) sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f fails to start due to a Node issue. It looks like this was introduced with unleash-server was upgraded to 4.1.1.

Repro steps:

  1. Download the image
docker pull unleashorg/unleash-server@sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f

docker.io/unleashorg/unleash-server@sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f: Pulling from unleashorg/unleash-server
Digest: sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f
Status: Image is up to date for unleashorg/unleash-server@sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f
docker.io/unleashorg/unleash-server@sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f
  1. Run
docker run unleashorg/unleash-server@sha256:37e41fde6c33bfe7df3f409631d5a876c3046f852e51eb797025f746040e207f

/unleash/node_modules/unleash-server/dist/lib/routes/admin-api/feature.js:69
        const strategies = globalEnv?.strategies || [];
                                     ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/unleash/node_modules/unleash-server/dist/lib/routes/admin-api/index.js:8:35)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

Is it possible for someone to take a look please?

Thanks much.

Push arm64 arch Docker container

Hi,

I have the need to run this service on the arm64 platform.

I have built unleash-server and unleash-proxy as multi-arch images and published them to unblock my team, but it would be great if the official images supported arm64 along with amd64.

I noted your unleash-proxy repo was already using buildx to build your images so my PR there was simple, Unleash/unleash-proxy#30.

As you are dynamically generating your Dockerfile in this repo, it may be slightly more involved to create a PR for this change.

There is as a small change needed to the Dockerfile in order to build on arm64 due to https://github.com/kelektiv/node.bcrypt.js/ not having pre-built binaries for the architecture. These are only added to the build stage.

FROM node:14-alpine as builder
 
RUN apk add --no-cache python3 py3-pip make g++

WORKDIR /unleash
...

If there is interest in this, I'm happy to contribute a PR to update the script that builds the PR, however, I will need some help with the GitHub actions as I'm not familiar with this tool.

Fail to run 'docker-compose up' on clean install

After cloning the repo, and running docker-compose up the following error is encountered:

docker-compose up
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Building web
Step 1/6 : FROM node:12-alpine
 ---> bac10e6a703a
Step 2/6 : COPY package.json package-lock.json ./
 ---> Using cache
 ---> dcfbf8e217d1
Step 3/6 : RUN npm ci
 ---> Running in 0a09f962f261
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-06-01T15_29_32_224Z-debug.log
ERROR: Service 'web' failed to build: The command '/bin/sh -c npm ci' returned a non-zero code: 1

Local network tested and connectivity to registry.npmjs.org was fine.

Workaround

Running npm i in the root directory before running docker-compose up

Tags for each version change

Hi,

I have integrated this repository into an automated deployment process and I think it would be really helpful if there were a tag on this repository for each Unleash version bump in the package.json.

Thanks a bunch!

Docker DATABASE_SSL Deserializing JSON

If I run with DATABASE_SSL set to false it works perfectly well but I want to enable SSL.

I am running my docker container with the following command:

docker run -p 4242:4242 -e DATABASE_HOST=host_here -e DATABASE_NAME=unleash -e DATABASE_USERNAME=username_here -e DATABASE_PASSWORD=password_here -e DATABASE_SSL='{"ca":"certificate","rejectUnauthorized":false}' unleashorg/unleash-server

And then I get the following output in the terminal:
undefined:1
{ca:certificate,rejectUnauthorized:false}

SyntaxError: Unexpected token c in JSON at position 1
at JSON.parse ()
at Object. (/unleash/node_modules/unleash-server/dist/lib/create-config.js:82:16)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object. (/unleash/node_modules/unleash-server/dist/lib/server-impl.js:34:25)
at Module._compile (internal/modules/cjs/loader.js:1085:14)

I assume it's over-escaping and causing issues or potentially I am just passing the stringified json incorrectly. I have been passing the stringified json because of the following on the unleash configuration page (https://docs.getunleash.io/deploy/configuring_unleash):
"ssl - an object describing ssl options, see https://node-postgres.com/features/ssl (DATABASE_SSL, as a stringified json object)"

Docker Hub 2 digit version

Describe the feature request

Looking on docker hub i've found these 3 tags pointing to same version 3489cd0bc7fb.

  • unleashorg/unleash-server:latest
  • unleashorg/unleash-server:4
  • unleashorg/unleash-server:4.14.5

but the version unleashorg/unleash-server:4.14 does not exists.

cc @chriswk

Background

Is usual when build docker images, produces 4 tags per build

  • latest
  • 1 major
  • 1.1 major and minor
  • 1.1.1 major, minor and patch

Looking for the history of tags on docker hub, my judgment that it can was forgot in last release.

Solution suggestions

No response

Need to start twice to connect to DB

When starting a fresh docker-compose the postgres image startes and restarts to create db and roles. This makes it unavailable for the web container.

How to reproduce:

//remove all running instances
docker-compose rm -v

//build and start
docker-compose build
docker-compose up
//Unleash fails to start.

Start it again:

docker-compose up

now unleash will be available on http://localhost:4242

In v.4.6.1, failed to start by docker-compose

Hi.

It worked fine with docker, but failed with docker-compose.

web_1  | internal/modules/cjs/loader.js:905
web_1  |   throw err;
web_1  |   ^
web_1  |
web_1  | Error: Cannot find module '/unleash/npm'
web_1  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
web_1  |     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
web_1  |     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
web_1  |     at internal/main/run_main_module.js:17:47 {
web_1  |   code: 'MODULE_NOT_FOUND',
web_1  |   requireStack: []
web_1  | }
unleash-docker_web_1 exited with code 1

It seems that the following commit (91cb2f5755244bc2b011c03515aea878ed6fcfba ) line is affected.

RUN rm -rf /usr/local/lib/node_modules/npm/

If I removed this line, it will work with docker-compose.
Can you fix this problem?

Startup sequence of docker-compose services are wrong

Describe the bug

When starting from a fresh machine with docker/docker-compose installed, the unleash container starts up before postgres is ready, this causes the unleash container to not successfully start and http://localhost:4242 to not respond

Steps to reproduce the bug

Without a postgres container or an unleash container already started.

  1. Clone the repo
  2. cd into the repo folder
  3. docker-compose up

Expected behavior

Postgres, Unleash and Unleash-proxy all to start successfully

Logs, error output, etc.

unleash-docker-web-1    | [2022-09-08T06:37:27.113] [ERROR] server-impl.js - Failed to migrate db OperationalError: connect ECONNREFUSED 172.18.0.2:5432
unleash-docker-web-1    |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16) {
unleash-docker-web-1    |   cause: Error: connect ECONNREFUSED 172.18.0.2:5432
unleash-docker-web-1    |       at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16) {
unleash-docker-web-1    |     errno: -111,
unleash-docker-web-1    |     code: 'ECONNREFUSED',
unleash-docker-web-1    |     syscall: 'connect',
unleash-docker-web-1    |     address: '172.18.0.2',
unleash-docker-web-1    |     port: 5432
unleash-docker-web-1    |   },
unleash-docker-web-1    |   isOperational: true,
unleash-docker-web-1    |   errno: -111,
unleash-docker-web-1    |   code: 'ECONNREFUSED',
unleash-docker-web-1    |   syscall: 'connect',
unleash-docker-web-1    |   address: '172.18.0.2',
unleash-docker-web-1    |   port: 5432
unleash-docker-web-1    | }
unleash-docker-web-1    | [ERROR] Error: connect ECONNREFUSED 172.18.0.2:5432
unleash-docker-web-1    |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)


### Screenshots

_No response_

### Additional context

Currently, the workaround is to simply stop the compose services and then start them again. But it gives our users a poor first-time experience

### Unleash version

4.14

### Subscription type

_No response_

### Hosting type

_No response_

### SDK information (language and version)

_No response_

Metrics don't seem to work when docker-compose

I ran into this oddball issue while taking a swing @ Unleash/unleash-client-python#16

Steps to Reproduce

  1. Start up Unleash + Postgres using docker-compose build and docker-compose up.
  2. Create a demo feature flag:
  3. Create a silly simple script to check feature flag once every ten seconds (or something similar.
import time
from UnleashClient import UnleashClient

# ---
import logging
import sys

root = logging.getLogger()
root.setLevel(logging.DEBUG)

handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
root.addHandler(handler)
# ---


my_client = UnleashClient(
    url="http://localhost:4242/api",
    app_name="pyIvan"
)

my_client.initialize_client()

while True:
    time.sleep(10)
    print(my_client.is_enabled("Demo"))

Repeat steps 1-3 using an Unleash server instance backed by a Postgres database.

Issue Observed
When using docker compose, the feature flag metric seems stuck on 0/0.

Screen Shot 2019-04-19 at 6 57 59 AM

exec-ing into the Postgres container seems to show that the metrics data is present in the database correctly. (This was from a test run I did yesterday AM.)

postgres=# select * from client_metrics
postgres-# ;
 id  |          created_at           |                                                                                                metrics
-----+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  46 | 2019-04-18 11:51:56.718434+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:50:56.456Z","stop":"2019-04-18T07:51:56.672Z","toggles":{"Demo":{"yes":5,"no":0}}}}
  47 | 2019-04-18 11:52:56.720726+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:51:56.706Z","stop":"2019-04-18T07:52:56.672Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  48 | 2019-04-18 11:53:56.714373+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:52:56.699Z","stop":"2019-04-18T07:53:56.667Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  49 | 2019-04-18 11:54:56.687185+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:53:56.695Z","stop":"2019-04-18T07:54:56.670Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  79 | 2019-04-18 11:58:35.136196+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:57:34.957Z","stop":"2019-04-18T07:58:35.107Z","toggles":{"Demo":{"yes":5,"no":0}}}}
  80 | 2019-04-18 11:59:35.133494+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:58:35.151Z","stop":"2019-04-18T07:59:35.107Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  81 | 2019-04-18 12:00:35.146794+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:59:35.135Z","stop":"2019-04-18T08:00:35.104Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  82 | 2019-04-18 12:01:35.137373+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:00:35.157Z","stop":"2019-04-18T08:01:35.104Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  83 | 2019-04-18 12:02:35.172807+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:01:35.144Z","stop":"2019-04-18T08:02:35.110Z","toggles":{"Demo":{"yes":6,"no":0}}}}
  84 | 2019-04-18 12:03:35.13187+00  | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:02:35.184Z","stop":"2019-04-18T08:03:35.106Z","toggles":{"test":{"yes":0,"no":0},"Demo":{"yes":6,"no":0}}}}
  85 | 2019-04-18 12:04:35.13085+00  | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:03:35.134Z","stop":"2019-04-18T08:04:35.105Z","toggles":{"test":{"yes":0,"no":0},"Demo":{"yes":6,"no":0}}}}
 115 | 2019-04-18 12:09:09.59915+00  | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:08:09.475Z","stop":"2019-04-18T08:09:09.554Z","toggles":{"Demo":{"yes":5,"no":0},"test":{"yes":0,"no":0}}}}
 116 | 2019-04-18 12:10:09.592847+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:09:09.606Z","stop":"2019-04-18T08:10:09.559Z","toggles":{"Demo":{"yes":6,"no":0},"test":{"yes":0,"no":0}}}}
(13 rows)

postgres=# select * from client_applications;
          app_name          |          created_at           |          updated_at           | seen_at |                                                               strategies                                                               | description | icon | url | color
----------------------------+-------------------------------+-------------------------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+-------------+------+-----+-------
 unleash-python-integration | 2019-04-01 11:13:03.873981+00 | 2019-04-01 11:13:03.873981+00 |         | ["applicationHostname","default","gradualRolloutRandom","gradualRolloutSessionId","gradualRolloutUserId","remoteAddress","userWithId"] |             |      |     |
 pyIvan                     | 2019-04-01 11:13:03.873981+00 | 2019-04-18 12:08:09.531497+00 |         | ["applicationHostname","default","gradualRolloutRandom","gradualRolloutSessionId","gradualRolloutUserId","remoteAddress","userWithId"] |             |      |     |
(2 rows)

postgres=# select * from client_instances;
 app_name |      instance_id      |     client_ip     |           last_seen           |          created_at           |         sdk_version
----------+-----------------------+-------------------+-------------------------------+-------------------------------+-----------------------------
 pyIvan   | unleash-client-python | ::ffff:172.19.0.1 | 2019-04-18 12:10:09.619072+00 | 2019-04-18 11:50:56.566464+00 | unleash-client-python:2.1.0
(1 row)

postgres=#

Oddly, if I run a local Unleash server pointed at a remote Postgres database (a free ElephantSQL database), it work totally fine!

Custom postgres port is ignored

We try to run the postgres database on a port other than the default 5432. Unfortunately, the unleash container can no longer connect. The environment variable seems to be ignored. Only when using the default port does it work.

Here is the compose file:

version: "3.3"

services:
  unleash-db:
    image: postgres:9.6
    ports:
      - "5439:5432"
    environment:
      POSTGRES_DB: "unleash"
      POSTGRES_USER: "unleash_user"
      POSTGRES_PASSWORD: "some_password"

  unleash:
    image: unleashorg/unleash-server
    environment:
      DATABASE_HOST: "unleash-db"
      DATABASE_PORT: 5439
      DATABASE_USERNAME: "unleash_user"
      DATABASE_PASSWORD: "some_password"
      DATABASE_NAME: "unleash"
      DATABASE_SSL: "false"
      DATABASE_SCHEMA: "public"
    depends_on:
      - unleash-db

One of the modules is being flagged as malware

Describe the feature request

I suggest you remove the following module:

node_modules/es5-5ext/_postinstall.js

Our security team has found the following:

Background

After our company decided to switch over to unleash and deploy it on EC2, our security team scanned the container with unleash installed on it and found that node_modules/es5-5ext/_postinstall.js is being flagged as a malware.

Solution suggestions

No response

Errors with starting postgres-alpine

I had issues with starting the docker images with postgres-alpine.
I think the issue was docker-library/postgres#501

I just removed -alpine and use the standard image... That fixed it for me.

Have not submitted a PR, since I did not dig into it, but it is worth looking into if one wants to keep the alpine image.

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.