Re: ports mit Doppelpunkt nach docker-compose schreiben

Lars Liedtke <liedtke-mjUko/[email protected]>
Newsgroups gmane.comp.python.general.german
Organization punkt.de GmbH
Message-ID <[email protected]>
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  -  [email protected]
>> https://mail.python.org/mailman/listinfo/python-de
> _______________________________________________
> python-de maillist  -  [email protected]
> https://mail.python.org/mailman/listinfo/python-de

-- 
---
punkt.de GmbH
Lars Liedtke
.infrastructure

Kaiserallee 13a	
76133 Karlsruhe

Tel. +49 721 9109 500
https://infrastructure.punkt.de
info-mjUko/[email protected]

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein

_______________________________________________
python-de maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/python-de
signature.asc (application/pgp-signature, 899 B)
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEh0MJwNfa5yPlb1D23W10TsFigGIFAl+Rs+QACgkQ3W10TsFi
gGJSyA/8Ca8J1pNPAjIT2nDzTdmT06H/tFuN3WQUnAJZh715v79ebGrBSEi9KxAX
fiqg+m9QqsEV/GjxgQB4Dk0SRgt9X1gRGwDIbkKk4Ud7lsqlpHcGUGi/b1C14/+l
ZYhPu4f17LgN7IesK/YXbHma0id0eOxDlYKp8LGzlzr4h6xWGdy4IRSF7jdnYA9j
Fcbamhdju8O6bJVce8RfFxldtyF1oVEBZtKdfU3L+pk2hpled/AvyAnfT8nUgyy/
QX7pjmIy0+avPO0NOdPU2RH76kPbq3FqqN1YjtY7nff2tCDM7PojBvB8zRU8L0JM
SD8Wwtr2wOThOIDVOATpugIM9j2zClQ0Oh2DzoBLbAeEcM5WMB3yCLo3DopECGkf
h4em4/RViHpCiV6Wf2C8/Tj87GpUKlTxAJJwi3u1FnNwiBoDDtN5YT2Zr2QDh4Z7
js0GnmLNQ8z5Fm276z16dMtKKDrAM/cwB6NSBM1NL8hi9BGzJUIEzdawvY9BTSen
n97mg5BXYaVhKvUW6g0x/eWD/hdl47JDgeN1SnOs6ujz45FgDwfbaFf3BzQVKAQ3
oswGJj83+ws6yoqM/dVKkfZosQZWKlUf/KPYyd097Wm8AWzgvaszBHemGkcHWcZv
VxQDyhJoY1YB4oaza4D+MuTBsOrK+dB9qIDCXlcauSuiJfcu2A0=
=TXeo
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.