azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.66k stars 130 forks source link

[BUG]: Create ServApp Port Mixup in Compose #232

Closed mandopatriot closed 7 months ago

mandopatriot commented 7 months ago

What happened?

When creating a ServApp and adding ports to expose, host port and container port are swapped in the compose file.

EXAMPLE - I put 8080 in host port and 80 in container port, because my host already has 80 in use but the container uses 80. The docker compose generated puts 80 for the host and 8080 for container, like "80:8080/tcp".

What should have happened?

I put 8080 in host port and 80 in container port, because my host already has 80 in use but the container uses 80. In the compose file, it should be "8080:80/tcp".

How to reproduce the bug?

  1. Go to ServApps.
  2. Click Start ServApp
  3. Enter any relevant info and continue to Network tab.
  4. Add a port to expose.
  5. Continue to Review & Start tab and view compose file.

Relevant log output

Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use

Other details

No response

System details

azukaar commented 7 months ago

Fixed in 0.15.4