Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Put the port directly in the dockerfile
Browse files Browse the repository at this point in the history
The 'exec' form of CMD does not do variable substitution. There's no need to make the port number configurable, however.
  • Loading branch information
marksparkza committed Jun 10, 2020
1 parent eb60ff0 commit 6ad4b0f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion deploy/core-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ services:
dockerfile: Dockerfile-${SERVER_ENV}
args:
- CA_CERT_URL=${ODP_ADMIN_URL}/ca.crt
- PORT=9999
networks:
- odp-core-net
ports:
Expand Down
3 changes: 1 addition & 2 deletions deploy/core-services/odp-admin-api/Dockerfile-development
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ ARG CA_CERT_URL
RUN curl ${CA_CERT_URL} -k -f -o /usr/local/share/ca-certificates/saeon-internal-ca.crt; exit 0
RUN update-ca-certificates

ARG PORT
CMD ["uvicorn", "accountsapi:app", "--host", "0.0.0.0", "--port", "${PORT}"]
CMD ["uvicorn", "accountsapi:app", "--host", "0.0.0.0", "--port", "9999"]
3 changes: 1 addition & 2 deletions deploy/core-services/odp-admin-api/Dockerfile-production
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ ARG CA_CERT_URL
RUN curl ${CA_CERT_URL} -k -f -o /usr/local/share/ca-certificates/saeon-internal-ca.crt; exit 0
RUN update-ca-certificates

ARG PORT
CMD ["uvicorn", "accountsapi:app", "--host", "0.0.0.0", "--port", "${PORT}"]
CMD ["uvicorn", "accountsapi:app", "--host", "0.0.0.0", "--port", "9999"]
3 changes: 1 addition & 2 deletions deploy/core-services/odp-admin-api/Dockerfile-staging
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ ARG CA_CERT_URL
RUN curl ${CA_CERT_URL} -k -f -o /usr/local/share/ca-certificates/saeon-internal-ca.crt; exit 0
RUN update-ca-certificates

ARG PORT
CMD ["uvicorn", "accountsapi:app", "--host", "0.0.0.0", "--port", "${PORT}"]
CMD ["uvicorn", "accountsapi:app", "--host", "0.0.0.0", "--port", "9999"]

0 comments on commit 6ad4b0f

Please sign in to comment.