Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E0799200B59 for ; Mon, 8 Aug 2016 22:33:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DEEAD160A77; Mon, 8 Aug 2016 20:33:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 22B57160AB3 for ; Mon, 8 Aug 2016 22:33:25 +0200 (CEST) Received: (qmail 56490 invoked by uid 500); 8 Aug 2016 20:33:25 -0000 Mailing-List: contact commits-help@guacamole.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@guacamole.incubator.apache.org Delivered-To: mailing list commits@guacamole.incubator.apache.org Received: (qmail 56481 invoked by uid 99); 8 Aug 2016 20:33:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 20:33:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id EF3FC1A046F for ; Mon, 8 Aug 2016 20:33:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TNLPpiL1ItP0 for ; Mon, 8 Aug 2016 20:33:23 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 2A2575FBB1 for ; Mon, 8 Aug 2016 20:33:22 +0000 (UTC) Received: (qmail 55655 invoked by uid 99); 8 Aug 2016 20:33:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 20:33:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A1A972C0D69 for ; Mon, 8 Aug 2016 20:33:20 +0000 (UTC) Date: Mon, 8 Aug 2016 20:33:20 +0000 (UTC) From: "Michael Jumper (JIRA)" To: commits@guacamole.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (GUACAMOLE-32) Extended variable support in guacamole-docker image for linked databases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 08 Aug 2016 20:33:27 -0000 [ https://issues.apache.org/jira/browse/GUACAMOLE-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Jumper updated GUACAMOLE-32: ------------------------------------ Comment: was deleted (was: Github user vchrisb commented on a diff in the pull request: https://github.com/apache/incubator-guacamole-client/pull/10#discussion_r64998961 --- Diff: guacamole-docker/bin/start.sh --- @@ -90,15 +90,21 @@ set_optional_property() { ## instead of a linked container. ## associate_mysql() { - - # Use linked container if specified - if [ -n "$MYSQL_NAME" ]; then - MYSQL_HOSTNAME="$MYSQL_PORT_3306_TCP_ADDR" - MYSQL_PORT="$MYSQL_PORT_3306_TCP_PORT" - fi - - # Use default port if none specified - MYSQL_PORT="${MYSQL_PORT-3306}" + : ${MYSQL_HOSTNAME:=mysql} --- End diff -- Using `MYSQL_PORT_3306_TCP_ADDR` and `MYSQL_PORT_3306_TCP_PORT` is deprecated as of [Link environment variables reference](https://docs.docker.com/compose/link-env-deprecated/). Linked services are reachable by the service name or its alias. In this case the alias of the database service is `mysql`. Please see [Links](https://docs.docker.com/compose/compose-file/#links). Docker is either adding a `Hosts`entry for the linked docker image, newer docker versions do have a build in DNS server. ) > Extended variable support in guacamole-docker image for linked databases > ------------------------------------------------------------------------ > > Key: GUACAMOLE-32 > URL: https://issues.apache.org/jira/browse/GUACAMOLE-32 > Project: Guacamole > Issue Type: Improvement > Reporter: Michael Jumper > Priority: Minor > > {panel:bgColor=#FFFFEE} > *The description of this issue was copied from [GUAC-1545|https://glyptodon.org/jira/browse/GUAC-1545], an issue in the JIRA instance used by the Guacamole project prior to its acceptance into the Apache Incubator.* > Comments, attachments, related issues, and history from prior to acceptance *have not been copied* and can be found instead at the original issue. > {panel} > The current Guacamole Docker image has some issues related to environment variables: > # The link environmental variables, like {{MYSQL_PORT_3306_TCP_ADDR}}, are deprecated (see the [link environment variables reference|https://docs.docker.com/compose/link-env-deprecated/]). The name of the service, or alias, should be used to connect instead. > # The current docker image is not leveraging all of the environmental variables of the linked database container. (e.g. {{MYSQL_ENV_MYSQL_USER}}) > # The current name of the environmental variables {{MYSQL_PORT}} and {{POSTGRES_PORT}} are not the best choice, because they are also used by Docker (though deprecated) for specifying the full connection URL to the linked container. e.g. {{tcp://172.17.0.5:5432}} > I've created a pull request implementing the following changes: > - Adding support for leveraging {{MYSQL_ENV_MYSQL_USER}}, {{MYSQL_ENV_MYSQL_PASSWORD}}, {{MYSQL_ENV_MYSQL_DATABASE}} and {{MYSQL_ENV_MYSQL_ROOT_PASSWORD}} for linked > - Removed deprecated environmental variables {{MYSQL_NAME}}, {{MYSQL_PORT_3306_TCP_ADDR}} and {{MYSQL_PORT_3306_TCP_PORT}} > - Adding support for leveraging {{POSTGRES_ENV_POSTGRES_USER}}, {{POSTGRES_ENV_POSTGRES_PASSWORD}} and {{POSTGRES_ENV_POSTGRES_DB}} for linked > - Removed deprecated environmental variables {{POSTGRES_NAME}}, {{POSTGRES_PORT_5432_TCP_ADDR}} and {{POSTGRES_PORT_5432_TCP_PORT}} > The modified branch can be found here: > https://github.com/vchrisb/guacamole-docker/tree/linked-db-envs > The modified Docker image is {{vchrisb/guacamole:linked-db-envs}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)