Skip to content

Commit a02b316

Browse files
authored
Add custom port mapping in docker-compose (#559)
* add customizable port env vars to be used in docker-compose-dev and docker-compose-mac
1 parent 80d6fc9 commit a02b316

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tools/docker/docker-compose-dev.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
command: >-
3939
podman system service --time=0 tcp://0.0.0.0:8888
4040
ports:
41-
- 8888:8888
41+
- "${EDA_PODMAN_PORT:-8888}:8888"
4242
volumes:
4343
- 'podman_data:/home/podman/.local/share/containers/storage'
4444
depends_on:
@@ -49,7 +49,7 @@ services:
4949
image: "${EDA_UI_IMAGE:-quay.io/ansible/eda-ui:main}"
5050
environment: *common-env
5151
ports:
52-
- '8443:443'
52+
- '${EDA_UI_PORT:-8443}:443'
5353
depends_on:
5454
eda-api:
5555
condition: service_healthy
@@ -69,7 +69,7 @@ services:
6969
&& scripts/create_superuser.sh
7070
&& aap-eda-manage runserver 0.0.0.0:8000
7171
ports:
72-
- '8000:8000'
72+
- "${EDA_API_PORT:-8000}:8000"
7373
depends_on:
7474
redis:
7575
condition: service_healthy
@@ -92,7 +92,7 @@ services:
9292
- >-
9393
aap-eda-manage runserver 0.0.0.0:8000
9494
ports:
95-
- '8001:8000'
95+
- "${EDA_WS_PORT:-8001}:8000"
9696
depends_on:
9797
eda-api:
9898
condition: service_healthy
@@ -166,7 +166,7 @@ services:
166166
POSTGRESQL_ADMIN_PASSWORD: secret
167167
POSTGRESQL_DATABASE: eda
168168
ports:
169-
- '5432:5432'
169+
- '${EDA_PG_PORT:-5432}:5432'
170170
volumes:
171171
- 'postgres_data:/var/lib/pgsql/data'
172172
healthcheck:
@@ -179,7 +179,7 @@ services:
179179
redis:
180180
image: 'quay.io/sclorg/redis-6-c9s:latest'
181181
ports:
182-
- '6379:6379'
182+
- '${EDA_REDIS_PORT:-6379}:6379'
183183
healthcheck:
184184
test: [ 'CMD', 'redis-cli', 'ping' ]
185185
interval: 5s

tools/docker/docker-compose-mac.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ services:
2727
image: "${EDA_UI_IMAGE:-quay.io/ansible/eda-ui:main}"
2828
environment: *common-env
2929
ports:
30-
- '8443:443'
30+
- '${EDA_UI_PORT:-8443}:443'
3131
depends_on:
3232
eda-api:
3333
condition: service_healthy
@@ -46,7 +46,7 @@ services:
4646
&& scripts/create_superuser.sh
4747
&& aap-eda-manage runserver 0.0.0.0:8000
4848
ports:
49-
- '8000:8000'
49+
- '${EDA_API_PORT:-8000}:8000'
5050
depends_on:
5151
redis:
5252
condition: service_healthy
@@ -69,7 +69,7 @@ services:
6969
- >-
7070
aap-eda-manage runserver 0.0.0.0:8000
7171
ports:
72-
- '8001:8000'
72+
- '${EDA_WS_PORT:-8001}:8000'
7373
depends_on:
7474
eda-api:
7575
condition: service_healthy
@@ -144,7 +144,7 @@ services:
144144
POSTGRESQL_ADMIN_PASSWORD: secret
145145
POSTGRESQL_DATABASE: eda
146146
ports:
147-
- '5432:5432'
147+
- '${EDA_PG_PORT:-5432}:5432'
148148
volumes:
149149
- 'postgres_data:/var/lib/pgsql/data'
150150
healthcheck:
@@ -157,7 +157,7 @@ services:
157157
redis:
158158
image: 'quay.io/sclorg/redis-6-c9s:latest'
159159
ports:
160-
- '6379:6379'
160+
- '${EDA_REDIS_PORT:-6379}:6379'
161161
healthcheck:
162162
test: [ 'CMD', 'redis-cli', 'ping' ]
163163
interval: 5s

0 commit comments

Comments
 (0)