Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5702
| From | Stefan Fuhrmann <stefan@fuhrmann.homedns.org> |
|---|---|
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] ports mit Doppelpunkt nach docker-compose schreiben |
| Date | 2020-10-22 20:25 +0200 |
| Message-ID | <mailman.99.1603391151.17029.python-de@python.org> (permalink) |
| References | <e2b2aaec-fc21-db66-e7d9-8cbac5989723@fuhrmann.homedns.org> <ff662199-d3af-5548-1652-f1bdc110ca0d@fuhrmann.homedns.org> <88d83d77-33bb-6196-e4bb-27e68bbb82d0@punkt.de> <e1b08ce5-e79f-40ae-9f9e-a807faf0962e@fuhrmann.homedns.org> |
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
Back to de.comp.lang.python | Previous | Next | Find similar
Re: [Python-de] ports mit Doppelpunkt nach docker-compose schreiben Stefan Fuhrmann <stefan@fuhrmann.homedns.org> - 2020-10-22 20:25 +0200
csiph-web