okfn / docker-ckan

Docker images and Docker Compose setup for CKAN [Not Maintained]
GNU Affero General Public License v3.0
81 stars 88 forks source link

Stop using container_name: #107

Closed ondics closed 1 year ago

ondics commented 1 year ago

The services are explicitly named using container_name:.

This is critical e.g. when deploying multiple CKAN stack on a single Docker system.

Proposal:

Either container names should be set by .env environment variables

datapusher:
    container_name: ${DATAPUSHER_CONTAINER_NAME}

or - even simpler -

we take the service names (instead of container_name:) and configure services which need to access a different service:

ckan:
    ...

datapusher:
    environment:
      - CKAN_SERVICE_NAME=ckan
ondics commented 1 year ago

Was anybody successful in renaming the containers? We need a solution for a proof of concept.

ondics commented 1 year ago

works. just remove the container_name: and ensure the environment variables match the service names (e.g. for postgresql: CKAN_SQLALCHEMY_URL=postgresql://ckan:ckan@db/ckan