Skip to content

Commit 99f0a1e

Browse files
committed
Set listen addresses in sample config to 127.0.0.1
When in docker, these are replaced with 0.0.0.0 to allow access from outside docker.
1 parent 1bd6222 commit 99f0a1e

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ RUN sudo pip3 install --break-system-packages .
4949

5050
RUN sudo python3 prerequisites.py --yes --cmsuser=cmsuser install
5151

52-
RUN sudo sed 's|/cmsuser:your_password_here@localhost:5432/cmsdb"|/postgres@testdb:5432/cmsdbfortesting"|' ./config/cms.conf.sample \
52+
RUN sudo sed -e 's|/cmsuser:your_password_here@localhost:5432/cmsdb"|/postgres@testdb:5432/cmsdbfortesting"|' ./config/cms.conf.sample \
5353
| sudo tee /usr/local/etc/cms-testdb.conf
54-
RUN sudo sed 's|/cmsuser:your_password_here@localhost:5432/cmsdb"|/postgres@devdb:5432/cmsdb"|' ./config/cms.conf.sample \
54+
RUN sudo sed -e 's|/cmsuser:your_password_here@localhost:5432/cmsdb"|/postgres@devdb:5432/cmsdb"|' -e 's/127.0.0.1/0.0.0.0/' ./config/cms.conf.sample \
5555
| sudo tee /usr/local/etc/cms-devdb.conf
56+
RUN sudo sed -e 's/127.0.0.1/0.0.0.0/' ./config/cms.ranking.conf.sample | sudo tee /usr/local/etc/cms.ranking.conf
5657

5758
ENV LANG C.UTF-8
5859

config/cms.conf.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"_help": "in core_services. If you access them through a proxy (acting",
106106
"_help": "as a load balancer) running on the same host you could put",
107107
"_help": "127.0.0.1 here for additional security.",
108-
"contest_listen_address": [""],
108+
"contest_listen_address": ["127.0.0.1"],
109109
"contest_listen_port": [8888],
110110

111111
"_help": "Login cookie duration in seconds. The duration is refreshed",
@@ -142,7 +142,7 @@
142142
"_help": "Listening HTTP address and port for the AWS. If you access",
143143
"_help": "it through a proxy running on the same host you could put",
144144
"_help": "127.0.0.1 here for additional security.",
145-
"admin_listen_address": "0.0.0.0",
145+
"admin_listen_address": "127.0.0.1",
146146
"admin_listen_port": 8889,
147147

148148
"_help": "Login cookie duration for admins in seconds.",

0 commit comments

Comments
 (0)