fix: Gitea Traefik routing and connection pool optimization
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
This commit is contained in:
83
deployment/ansible/playbooks/check-env-file.yml
Normal file
83
deployment/ansible/playbooks/check-env-file.yml
Normal file
@@ -0,0 +1,83 @@
|
||||
---
|
||||
- name: Check .env File and Environment Variables
|
||||
hosts: production
|
||||
gather_facts: no
|
||||
become: no
|
||||
|
||||
vars:
|
||||
application_stack_dest: "{{ app_stack_path | default(stacks_base_path + '/production') }}"
|
||||
application_compose_suffix: "production.yml"
|
||||
|
||||
tasks:
|
||||
- name: Check if .env file exists
|
||||
stat:
|
||||
path: "{{ application_stack_dest }}/.env"
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
register: env_file_exists
|
||||
|
||||
- name: Display .env file status
|
||||
debug:
|
||||
msg: ".env file exists: {{ env_file_exists.stat.exists }}"
|
||||
|
||||
- name: Read .env file content (first 50 lines)
|
||||
shell: |
|
||||
head -50 {{ application_stack_dest }}/.env 2>&1 || echo "FILE_NOT_FOUND"
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
register: env_file_content
|
||||
changed_when: false
|
||||
when: env_file_exists.stat.exists
|
||||
|
||||
- name: Display .env file content
|
||||
debug:
|
||||
msg: |
|
||||
.env file content:
|
||||
{{ env_file_content.stdout }}
|
||||
|
||||
- name: Check for DB_DATABASE in .env file
|
||||
shell: |
|
||||
grep -E "^DB_DATABASE=|^DB_NAME=" {{ application_stack_dest }}/.env 2>&1 || echo "NOT_FOUND"
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
register: db_database_check
|
||||
changed_when: false
|
||||
when: env_file_exists.stat.exists
|
||||
|
||||
- name: Display DB_DATABASE check
|
||||
debug:
|
||||
msg: "DB_DATABASE in .env: {{ db_database_check.stdout }}"
|
||||
|
||||
- name: Check environment variables in queue-worker container
|
||||
shell: |
|
||||
docker compose -f {{ application_stack_dest }}/docker-compose.base.yml -f {{ application_stack_dest }}/docker-compose.{{ application_compose_suffix }} exec -T queue-worker env | grep -E "^DB_" | sort
|
||||
register: queue_worker_env
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Display queue-worker environment variables
|
||||
debug:
|
||||
msg: |
|
||||
Queue-Worker DB Environment Variables:
|
||||
{{ queue_worker_env.stdout | default('CONTAINER_NOT_RUNNING') }}
|
||||
|
||||
- name: Check docker-compose project directory
|
||||
shell: |
|
||||
cd {{ application_stack_dest }} && pwd
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
register: project_dir
|
||||
changed_when: false
|
||||
|
||||
- name: Display project directory
|
||||
debug:
|
||||
msg: "Docker Compose project directory: {{ project_dir.stdout }}"
|
||||
|
||||
- name: Check if .env file is in project directory
|
||||
shell: |
|
||||
test -f {{ application_stack_dest }}/.env && echo "EXISTS" || echo "MISSING"
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
register: env_in_project_dir
|
||||
changed_when: false
|
||||
|
||||
- name: Display .env file location check
|
||||
debug:
|
||||
msg: ".env file in project directory: {{ env_in_project_dir.stdout }}"
|
||||
|
||||
Reference in New Issue
Block a user