From 58b2dd2730d5ec8fbf8ead1f47041eb9558e9334 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 13 Feb 2026 00:25:22 +0100 Subject: [PATCH] Add GitLab CI/CD configuration --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..35ef2e2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +stages: + - build + - deploy + +variables: + DOCKER_IMAGE: "daily-briefing-app" + CONTAINER_NAME: "daily-briefing-running" + +build-image: + stage: build + tags: + - shell + script: + - docker build -t $DOCKER_IMAGE . + +deploy-container: + stage: deploy + tags: + - shell + script: + - docker stop $CONTAINER_NAME || true + - docker rm $CONTAINER_NAME || true + - docker run -d --name $CONTAINER_NAME -p 8080:8080 $DOCKER_IMAGE + only: + - master