Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Stefan Fuhrmann Newsgroups: de.comp.lang.python Subject: Re: [Python-de] ports mit Doppelpunkt nach docker-compose schreiben Date: Thu, 22 Oct 2020 20:25:47 +0200 Lines: 75 Message-ID: References: <88d83d77-33bb-6196-e4bb-27e68bbb82d0@punkt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de 2RRkUlTKtdNztKgeQdMVVgtqfqas3UQZkkepZJbCikWg== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org Authentication-Results: mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at willy.nopanicsystems.net User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <88d83d77-33bb-6196-e4bb-27e68bbb82d0@punkt.de> Content-Language: en-US X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <88d83d77-33bb-6196-e4bb-27e68bbb82d0@punkt.de> Xref: csiph.com de.comp.lang.python:5702 Ahoi zusammen, ja, super! Vielen Dank für eure Hilfe! Gruß Stefan Am 22.10.20 um 18:31 schrieb Lars Liedtke: > Hey, > > ich finde > > docker_compose["services"]["app"]["ports"] = [f"{str(ext_port)}:80"] > > schöner, das ist aber rein persönliches Empfinden. Aber vielleicht hilft > Dir das trotzdem. Schau mal nach f-strings. > > Viele Grüße > > Lars > > Am 22.10.20 um 18:28 schrieb Stefan Fuhrmann: >> Ahoi, >> >> >> habs tatsächlich gefunden: >> >> docker_compose["services"]["app"]["ports"] = [str(ext_port) +str(":80")] >> >> >> Am 22.10.20 um 15:12 schrieb Stefan Fuhrmann: >>> Hallo zusammen, >>> >>> >>> ich habe ein script, das mir nextcloud ausrollt und möchte es nun >>> erweitern, dass es auf ports prüft und entsprechend einen port >>> hochzählt und in die docker-compose schreibt. >>> >>> Im compose file wird es mit 8080:80 angegeben. >>> >>> >>> Ich habe es soweit , das es mir den port hochzählt und schreibt. Mir >>> gelingt es aber nicht :80 hinzuzufügen. >>> >>> Ich habe eine funktion "next_free_port" hinten soll :80 hinzu. >>> >>> docker_compose["services"]["app"]["ports"] = [next_free_port() +":80"] >>> >>> >>> Ich habe versucht und gesucht. Es will mir aber nicht gelingen. >>> >>> Kann jemand helfen? >>> >>> >>> Danke! >>> >>> Gruß >>> >>> Stefan >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> python-de maillist  -  python-de@python.org >>> https://mail.python.org/mailman/listinfo/python-de >> _______________________________________________ >> python-de maillist  -  python-de@python.org >> https://mail.python.org/mailman/listinfo/python-de