From 1fcd94e55fd93fe68414acb6589a70198ec472b6 Mon Sep 17 00:00:00 2001 From: Daniel Winther Date: Fri, 15 Nov 2024 11:57:22 +0100 Subject: [PATCH] ci: docker --- docker-compose.prod-run.yml | 2 +- scripts/build.sh | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100755 scripts/build.sh diff --git a/docker-compose.prod-run.yml b/docker-compose.prod-run.yml index 57adacb4..2ffae1ef 100644 --- a/docker-compose.prod-run.yml +++ b/docker-compose.prod-run.yml @@ -2,7 +2,7 @@ version: "3.7" services: frontend: - image: ghcr.io/etimo/diamonds2/rontend:${DIAMONDS_DOCKER_TAG} + image: ghcr.io/etimo/diamonds2/frontend:${DIAMONDS_DOCKER_TAG} restart: always environment: - VITE_API_BASE_URL=http://backend:3000/api diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100755 index c9bd4315..00000000 --- a/scripts/build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Get git hash -HASH=$(git rev-parse HEAD) -echo "Git hash: $HASH" - -# Login to docker -echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin - -docker build -t diamonds2_base:latest -f ../.docker/dockerfiles/base .. - -docker compose -f docker-compose.prod-build.yml build --parallel - -echo "Tagging images..." -docker tag diamonds2_backend:latest etimodanielwinther/diamonds2_base:latest -docker tag diamonds2_backend:latest etimodanielwinther/diamonds2_base:git-"$HASH" -docker tag diamonds2_frontend:latest etimodanielwinther/diamonds2_frontend:latest -docker tag diamonds2_frontend:latest etimodanielwinther/diamonds2_frontend:git-"$HASH" -docker tag diamonds2_backend:latest etimodanielwinther/diamonds2_backend:latest -docker tag diamonds2_backend:latest etimodanielwinther/diamonds2_backend:git-"$HASH" - - -echo "Pushing images..." -docker push etimodanielwinther/diamonds2_frontend:latest -docker push etimodanielwinther/diamonds2_frontend:git-"$HASH" -docker push etimodanielwinther/diamonds2_backend:latest -docker push etimodanielwinther/diamonds2_backend:git-"$HASH"