Skip to content

Commit 7995809

Browse files
authored
[docker] Allow specifying the host port in the compose file (#134)
This is necessary to remap the port from 8000 to 80 when deploying a production server, assuming we want to use the default HTTP port.
1 parent a86ab02 commit 7995809

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docker/compose.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,18 @@
1313
# The authentication token used to require authentication to
1414
# perform destructive actions.
1515
#
16-
# Additionally, the version of the llvm-lnt webserver image can be customized with
17-
# the LNT_IMAGE environment variable. It defaults to `latest`.
16+
# Additionally, the following aspects of the container can be customized:
17+
#
18+
# LNT_IMAGE
19+
# The version of the llvm-lnt webserver image used for the service.
20+
# Defaults to 'latest'.
21+
#
22+
# LNT_HOST_PORT
23+
# The host-side port that will be bound to the container-side port running
24+
# the webserver. This defaults to '8000', which is consistent with what LNT
25+
# uses by default for local servers and development. However, production
26+
# instances may want to map their port '80' (the default HTTP port) to the
27+
# container's port '8000'.
1828

1929
name: llvm-lnt
2030

@@ -41,7 +51,7 @@ services:
4151
restart_policy:
4252
condition: on-failure
4353
ports:
44-
- "8000:8000"
54+
- "${LNT_HOST_PORT:-8000}:8000"
4555
volumes:
4656
- instance:/var/lib/lnt
4757
- logs:/var/log/lnt

0 commit comments

Comments
 (0)