From 6db20ab60015320b093dc15aaf9a49a01a9bcd69 Mon Sep 17 00:00:00 2001 From: mahdi Date: Sun, 19 Jul 2026 23:47:06 +0330 Subject: [PATCH] ci: include application stack inside repository and fix deployment path --- .gitlab-ci.yml | 5 ++--- stacks/hello-world/docker-compose.yml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 stacks/hello-world/docker-compose.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80df616..21d6940 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,6 @@ deploy_application: stage: deploy image: docker:24.0.7-cli script: - # FIXED: Added the missing hyphen below to make it a proper list item - docker pull nginxdemos/hello:plain-text - # Deploy the stack directly onto the host using the shared docker.sock - - docker compose -f ../../stacks/applications/hello-world/docker-compose.yml up -d \ No newline at end of file + # FIXED: Now pointing to the local path inside the repository root + - docker compose -f ./stacks/hello-world/docker-compose.yml up -d \ No newline at end of file diff --git a/stacks/hello-world/docker-compose.yml b/stacks/hello-world/docker-compose.yml new file mode 100644 index 0000000..4969121 --- /dev/null +++ b/stacks/hello-world/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3.8' + +services: + web-test: + image: nginxdemos/hello:plain-text + container_name: hello_world_app + restart: always + ports: + - "127.0.0.1:8080:80" # Exposed only to localhost for Nginx reverse proxy + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" \ No newline at end of file