diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5bfeb7a..1e6163c 100755 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,8 +15,9 @@ x-volumes-docker: &volumes-docker - /var/run/docker.sock:/var/run/docker.sock x-docker-user: &docker-user - user: "mercure:${GID}" - + user: "${UID}:${DOCKER_GID}" +x-user: &user + user: "${UID}:${GID}" services: ui: <<: *docker-user @@ -46,6 +47,7 @@ services: test: [ "CMD-SHELL", "pg_isready -U mercure" ] receiver: + <<: *user image: mercureimaging/mercure-receiver${IMAGE_TAG} restart: always depends_on: @@ -57,6 +59,7 @@ services: <<: *env cleaner: + <<: *user image: mercureimaging/mercure-cleaner${IMAGE_TAG} restart: always depends_on: @@ -66,6 +69,7 @@ services: <<: *env dispatcher: + <<: *user image: mercureimaging/mercure-dispatcher${IMAGE_TAG} restart: always depends_on: @@ -85,6 +89,7 @@ services: <<: *env router: + <<: *user image: mercureimaging/mercure-router${IMAGE_TAG} restart: always depends_on: @@ -94,6 +99,7 @@ services: <<: *env bookkeeper: + <<: *user image: mercureimaging/mercure-bookkeeper${IMAGE_TAG} restart: always depends_on: diff --git a/install.sh b/install.sh index 072561f..b75dda8 100755 --- a/install.sh +++ b/install.sh @@ -308,7 +308,10 @@ setup_docker () { if [ ! -f "$MERCURE_BASE"/docker-compose.yml ]; then echo "## Copying docker-compose.yml..." sudo cp $MERCURE_SRC/docker/docker-compose.yml $MERCURE_BASE - sudo sed -i -e "s/\\\${GID}/$(getent group docker | cut -d: -f3)/g" $MERCURE_BASE/docker-compose.yml + sudo sed -i -e "s/\\\${DOCKER_GID}/$(getent group docker | cut -d: -f3)/g" $MERCURE_BASE/docker-compose.yml + sudo sed -i -e "s/\\\${UID}/$(getent passwd mercure | cut -d: -f3)/g" $MERCURE_BASE/docker-compose.yml + sudo sed -i -e "s/\\\${GID}/$(getent passwd mercure | cut -d: -f4)/g" $MERCURE_BASE/docker-compose.yml + sudo sed -i "s/\\\${IMAGE_TAG}/$IMAGE_TAG/g" $MERCURE_BASE/docker-compose.yml sudo chown $OWNER:$OWNER "$MERCURE_BASE"/docker-compose.yml fi @@ -396,6 +399,7 @@ systemd_install () { docker_install () { echo "## Performing docker-type mercure installation..." + create_user create_folders install_configuration install_docker @@ -501,4 +505,4 @@ case "$INSTALL_TYPE" in ;; esac -echo "Installation complete" +echo "Installation complete" \ No newline at end of file