From 4c9d768df66a4240aa081a8948cf163478c7b2fd Mon Sep 17 00:00:00 2001 From: Arnav <48650781+arnavrneo@users.noreply.github.com> Date: Sat, 23 Mar 2024 22:27:21 +0530 Subject: [PATCH 1/2] update/docker-compose --- url-shortener/frontend-servers/compose.yaml | 7 +++---- url-shortener/servers/compose.yaml | 4 ++-- url-shortener/servers/proxy/urlShort.conf | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/url-shortener/frontend-servers/compose.yaml b/url-shortener/frontend-servers/compose.yaml index 030a129..52045f2 100644 --- a/url-shortener/frontend-servers/compose.yaml +++ b/url-shortener/frontend-servers/compose.yaml @@ -1,7 +1,6 @@ services: frontend: image: d12758100786 - container_name: frontend1 # build: # context: ../frontend/ # dockerfile: Dockerfile @@ -10,7 +9,7 @@ services: go-backend: image: 4b33b091a935 - container_name: go + container_name: go # for referencing inside the other containers # build: # context: ../servers/go/ # dockerfile: Dockerfile @@ -21,7 +20,7 @@ services: express-backend: image: feb890d9439b - container_name: express1 + container_name: express # build: # context: ../servers/express-js/ # dockerfile: Dockerfile @@ -37,5 +36,5 @@ services: ports: - "8080:80" depends_on: - - go-backend + - go-backend # cant use container name here - express-backend diff --git a/url-shortener/servers/compose.yaml b/url-shortener/servers/compose.yaml index 17b15bd..06cb89a 100644 --- a/url-shortener/servers/compose.yaml +++ b/url-shortener/servers/compose.yaml @@ -1,6 +1,6 @@ services: go: - image: 4b33b091a935 + image: 4b33b091a935 # replace with image/local-tagid # build: # context: go/ # dockerfile: Dockerfile @@ -8,7 +8,7 @@ services: - "1234:1234" express: - image: feb890d9439b + image: feb890d9439b # replace with image/local-tagid # build: # context: express-js/ # dockerfile: Dockerfile diff --git a/url-shortener/servers/proxy/urlShort.conf b/url-shortener/servers/proxy/urlShort.conf index 762028b..46b3181 100644 --- a/url-shortener/servers/proxy/urlShort.conf +++ b/url-shortener/servers/proxy/urlShort.conf @@ -1,7 +1,6 @@ upstream backend { - least_conn; server go:1234; - server go:5678; + server express:5678; } server { From 77bf5f0b8a3a13e4183cc844094d742a39e153bc Mon Sep 17 00:00:00 2001 From: Arnav <48650781+arnavrneo@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:00:33 +0530 Subject: [PATCH 2/2] Create ansible-lint.yml --- .github/workflows/ansible-lint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/ansible-lint.yml diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml new file mode 100644 index 0000000..baeaee4 --- /dev/null +++ b/.github/workflows/ansible-lint.yml @@ -0,0 +1,23 @@ +# .github/workflows/ansible-lint.yml +name: ansible-lint +on: + pull_request: + branches: ["main"] + push: + branches: ["main"] + +jobs: + build: + name: Ansible Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Ansible Lint + run: | + sudo apt-get update + sudo apt-get install -y python3-pip + pip install ansible-lint + + - name: Linting the ansible role + working-directory: url-shortener/playbook/roles/docker + run: ansible-lint -p . --exclude=tests/