Container ports are mapped to exposed ports on the Docker host. Port mappings are defined via the nginx service within the docker-compose.yml file (found in the SImA installation directory). See lines 187-192 in the below example.
175 nginx:
176 <<: *service-base
177 image: nginx-server
178 restart: unless-stopped
179 build:
180 context: ..
181 dockerfile: services/nginx/Dockerfile
182 depends_on:
183 - sima-webapp
184 - gemini-api
185 - minio1
186 ports:
187 - 80:80
188 - 443:443
189 - 9000:9000
190 - 9001:9001
191 - 9500:9500
192 - 9501:9501
The format is as follows:
- host_port:container_port
In order to change a host port, the port mappings must be updated. Refer to the version specific workflows below for details on how to introduce the config changes.
SImA v1.1 and lower:
The docker-compose.yml file (found in the SImA installation directory) should be directly modified.
For example, if SImA is to be installed in a server where port 80 is already in use, and port 81 must be used instead, the following modification should be made to the port mapping under the nginx service (line 187 in the example above):
ports:
- 81:80
The SImA stack must be redeployed for this change to take effect.
SImA v1.2 and above:
The updated port mappings should be added to the docker-compose-custom.yml (override) file. For example, if SImA is to be installed in a server where port 80 is already in use, and port 81 must be used instead, the following lines should be added to docker-compose-custom.yml:
services:
nginx:
ports:
- 81:80
The SImA stack must be redeployed for this change to take effect.
Comments
0 comments
Article is closed for comments.