diff --git a/docker-compose.yaml b/docker-compose.yaml index 0fe6efbd..1e98a082 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,6 +3,7 @@ services: build: context: . target: build + image: "ghcr.io/opdavies/oliverdavies.uk-web:${DOCKER_TAG:-latest}" command: "sculpin generate --clean --port ${SCULPIN_PORT:-80} --url ${SCULPIN_URL:-http://localhost} --env ${SCULPIN_ENV:-dev} ${SCULPIN_GENERATE_ARGS}" volumes: - .:/app diff --git a/run b/run index 79037c08..6a52c9cf 100755 --- a/run +++ b/run @@ -2,8 +2,6 @@ set -eu -DOCKER_WEB_IMAGE_NAME="ghcr.io/opdavies/${COMPOSE_PROJECT_NAME:-oliverdavies.uk}-web" - TTY="" if [[ ! -t 1 ]]; then TTY="-T" @@ -12,15 +10,17 @@ fi DC="${DC:-exec}" function ci:build-images { - docker image build . \ - --tag ${DOCKER_WEB_IMAGE_NAME}:${DOCKER_TAG} \ - --tag ${DOCKER_WEB_IMAGE_NAME}:latest \ - --target=production + services=(app) + + DOCKER_TAG="$1" docker-compose build "${services[@]}" + DOCKER_TAG="latest" docker-compose build "${services[@]}" } function ci:push-images { - docker image push ${DOCKER_WEB_IMAGE_NAME}:${DOCKER_TAG} - docker image push ${DOCKER_WEB_IMAGE_NAME}:latest + services=(app) + + DOCKER_TAG="$1" docker-compose push "${services[@]}" + DOCKER_TAG="latest" docker-compose push "${services[@]}" } function cmd {