L
L
LakeForest2021-05-12 06:23:34
Yii
LakeForest, 2021-05-12 06:23:34

Why when I change the internal port y from 80 to another in docker-compose, yii2 stops working?

Can you please tell me why when I change the internal port from 80 to 5000, the server stops working?
How do I change the internal port in docker-compose so that the server responds?

My docker-compose.yum

"admin_panel": {
      "image": "yiisoftware/yii2-php:7.4-apache",
      "volumes": [
          "~/.composer:/root/.composer",
          "~/.composer-docker/cache:/root/.composer/cache:delegated",
          "./admin_panel/backend/basic:/app:delegated",
          "./admin_panel/backend/basic:/var/www"
      ],
      "ports": [
          "${YII_POST_EXT}:${YII_POST_INT}"
      ],
      "env_file": ".env",
      "depends_on": [
          "postgres",
          "rabbit"
      ]
    },

609b52601194e121490356.png
.env - here I want to set YII_POST_INT=5000, but if I don't set 80, then nothing works.
YII_POST_EXT=8001
YII_POST_INT=80

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-05-12
@q2digger

Does the application in the container know that its port has changed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question