Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack registry prefix #108

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker/main/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
context: ./schedulerservice
args:
docker_internal_registry: ${DOCKER_INTERNAL_REGISTRY}
stack_name: ${STACK_PREFIX:-}
comms_package_name: ${PYTHON_PACKAGE_DIST_NAME_COMMS:?}
scheduler_package_dist_name: ${PYTHON_PACKAGE_DIST_NAME_SCHEDULER:?}
scheduler_service_package_dist_name: ${PYTHON_PACKAGE_DIST_NAME_SCHEDULER_SERVICE:?}
Expand Down Expand Up @@ -66,6 +67,7 @@ services:
context: ./requestservice
args:
docker_internal_registry: ${DOCKER_INTERNAL_REGISTRY}
stack_name: ${STACK_PREFIX:-}
comms_package_name: ${PYTHON_PACKAGE_DIST_NAME_COMMS:?}
access_package_name: ${PYTHON_PACKAGE_DIST_NAME_ACCESS:?}
externalrequests_package_name: ${PYTHON_PACKAGE_DIST_NAME_EXTERNAL_REQUESTS:?}
Expand All @@ -76,6 +78,7 @@ services:
context: ./subsetservice
args:
docker_internal_registry: ${DOCKER_INTERNAL_REGISTRY}
stack_name: ${STACK_PREFIX:-}
comms_package_name: ${PYTHON_PACKAGE_DIST_NAME_COMMS:?}
modeldata_package_name: ${PYTHON_PACKAGE_DIST_NAME_MODELDATA:?}
subsetservice_package_name: ${PYTHON_PACKAGE_DIST_NAME_SUBSET_SERVICE:?}
Expand Down
3 changes: 2 additions & 1 deletion docker/main/requestservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# problem using the current registry (127.0.0.1:5000), apparently due to the ':'
# which Docker thinks is an invalid --from value in the multi-stage copy step
ARG docker_internal_registry
FROM ${docker_internal_registry}/dmod-py-sources as sources
ARG stack_name
FROM ${docker_internal_registry}/${stack_name}_dmod-py-sources as sources

FROM python:3.8-alpine
ARG comms_package_name
Expand Down
3 changes: 2 additions & 1 deletion docker/main/schedulerservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# problem using the current registry (127.0.0.1:5000), apparently due to the ':'
# which Docker thinks is an invalid --from value in the multi-stage copy step
ARG docker_internal_registry
FROM ${docker_internal_registry}/dmod-py-sources as sources
ARG stack_name
FROM ${docker_internal_registry}/${stack_name}_dmod-py-sources as sources

FROM python:3.8-alpine
ARG comms_package_name
Expand Down
3 changes: 2 additions & 1 deletion docker/main/subsetservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# problem using the current registry (127.0.0.1:5000), apparently due to the ':'
# which Docker thinks is an invalid --from value in the multi-stage copy step
ARG docker_internal_registry
FROM ${docker_internal_registry}/dmod-py-sources as sources
ARG stack_name
FROM ${docker_internal_registry}/${stack_name}_dmod-py-sources as sources

# Need to use base, rather than -alpine, image variant, due to C++ lib
# dependencies related to pandas when using the monitordata package.
Expand Down
3 changes: 2 additions & 1 deletion docker/nwm_gui/app_server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# problem using the current registry (127.0.0.1:5000), apparently due to the ':'
# which Docker thinks is an invalid --from value in the multi-stage copy step
ARG docker_internal_registry
FROM ${docker_internal_registry}/dmod-py-sources as sources
ARG stack_name
FROM ${docker_internal_registry}/${stack_name}_dmod-py-sources as sources

FROM python:3.8-slim
# Slurp (or set default) wheel package name ...
Expand Down
5 changes: 3 additions & 2 deletions docker/nwm_gui/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ services:

# Define a container belonging exclusively to our django application
app_server:
image: maas-portal-development
image: ${STACK_PREFIX:-}_maas-portal-development
build:
context: ../..
dockerfile: ./docker/nwm_gui/app_server/Dockerfile
args:
docker_internal_registry: ${DOCKER_INTERNAL_REGISTRY:?Missing DOCKER_INTERNAL_REGISTRY value (see 'Private Docker Registry ' section in example.env)}
comms_package_name: ${PYTHON_PACKAGE_DIST_NAME_COMMS:?}
stack_name: ${STACK_PREFIX:-}
networks:
- request-listener-net
# Call this when starting the container
Expand All @@ -52,7 +53,7 @@ services:
- SQL_ENGINE=django.db.backends.postgresql
- SQL_DATABASE=${DMOD_GUI_POSTGRES_DB:-dmod_dev}
- SQL_USER=${DMOD_GUI_POSTGRES_USER:?}
- SQL_HOST=db
- SQL_HOST=${STACK_PREFIX:-}_nwm_gui_db
- SQL_PORT=5432
- DATABASE=postgres
- DOCKER_SECRET_POSTGRES_PASS=postgres_password
Expand Down
2 changes: 1 addition & 1 deletion docker/py-sources/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
py-sources:
image: ${DOCKER_INTERNAL_REGISTRY:?Missing DOCKER_INTERNAL_REGISTRY value (see 'Private Docker Registry ' section in example.env)}/dmod-py-sources
image: ${DOCKER_INTERNAL_REGISTRY:?Missing DOCKER_INTERNAL_REGISTRY value (see 'Private Docker Registry ' section in example.env)}/${STACK_PREFIX:-}_dmod-py-sources
build:
context: ../../
dockerfile: ./docker/py-sources/py-sources.Dockerfile
Expand Down