From 2a8f844ecf5564b63a3430924e8bacdc91e40c30 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Tue, 26 Sep 2023 17:10:23 -0400 Subject: [PATCH 1/3] remove container_name? For discussion: Removing the `container_name` lines lets us run many ckan-docker sites at the same time (assuming you use different ports) What is the benefit in forcing a container name in the docker compose config? --- docker-compose.dev.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 0cf6312..dc2ecdf 100755 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -8,7 +8,6 @@ volumes: services: ckan-dev: - container_name: ${CKAN_CONTAINER_NAME} build: context: ckan/ dockerfile: Dockerfile.dev @@ -33,14 +32,12 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"] datapusher: - container_name: ${DATAPUSHER_CONTAINER_NAME} image: ckan/ckan-base-datapusher:${DATAPUSHER_VERSION} restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"] db: - container_name: ${POSTGRESQL_CONTAINER_NAME} build: context: postgresql/ environment: @@ -60,7 +57,6 @@ services: test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] solr: - container_name: ${SOLR_CONTAINER_NAME} image: ckan/ckan-solr:${SOLR_IMAGE_VERSION} volumes: - solr_data:/var/solr @@ -69,8 +65,7 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8983/solr/"] redis: - container_name: ${REDIS_CONTAINER_NAME} image: redis:${REDIS_VERSION} restart: unless-stopped healthcheck: - test: ["CMD", "redis-cli", "-e", "QUIT"] \ No newline at end of file + test: ["CMD", "redis-cli", "-e", "QUIT"] From 5fc1efce33dd6d752660dac3752d0c144c5a90cc Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 5 Oct 2023 13:34:29 +0200 Subject: [PATCH 2/3] Fix image tag in the Dev Dockerfile As per https://github.com/ckan/ckan-docker-base/pull/28 --- ckan/Dockerfile | 1 - ckan/Dockerfile.dev | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ckan/Dockerfile b/ckan/Dockerfile index 75001e9..8f0532e 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -1,5 +1,4 @@ FROM ckan/ckan-base:2.10.1 -#FROM ckan/ckan-base:2.9.9 # Set up environment variables ENV APP_DIR=/srv/app diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev index 8488f0b..1720f71 100644 --- a/ckan/Dockerfile.dev +++ b/ckan/Dockerfile.dev @@ -1,5 +1,4 @@ -FROM ckan/ckan-base:2.10.1-dev -#FROM ckan/ckan-base:2.9.9-dev +FROM ckan/ckan-dev:2.10.1 # Set up environment variables @@ -56,4 +55,4 @@ RUN for d in $APP_DIR/patches/*; do \ cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \ done ; \ fi ; \ - done \ No newline at end of file + done From ae0a02b107ac45b83b7f60a4c5eb526664824d96 Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 5 Oct 2023 14:28:54 +0200 Subject: [PATCH 3/3] update README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4ba6346..e38911b 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,10 @@ To start the containers: See [CKAN Images](#ckan-images) for more details of what happens when using development mode. +In dev mode, the `docker-compose.dev.yml` file intentionally excludes the specification of `container_names:`. This omission serves the purpose of facilitating the concurrent execution of multiple containers on the same host without necessitating updates to the container name for each project. For instance, duplicating the ckan-docker/ directory enables the simultaneous operation of more than one CKAN container. + +It is important to note that any container port that is configured to be mapped to the host will require the host port to be adjusted on a per-project basis. This adjustment is imperative to mitigate conflicts arising from port allocation. + ##### Create an extension