feat(Docker): Upgrade to PHP 8.5.0RC3 with native ext-uri support
BREAKING CHANGE: Requires PHP 8.5.0RC3 Changes: - Update Docker base image from php:8.4-fpm to php:8.5.0RC3-fpm - Enable ext-uri for native WHATWG URL parsing support - Update composer.json PHP requirement from ^8.4 to ^8.5 - Add ext-uri as required extension in composer.json - Move URL classes from Url.php85/ to Url/ directory (now compatible) - Remove temporary PHP 8.4 compatibility workarounds Benefits: - Native URL parsing with Uri\WhatWg\Url class - Better performance for URL operations - Future-proof with latest PHP features - Eliminates PHP version compatibility issues
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
---
|
||||
# Git-based Deployment Playbook with Releases/Symlink Pattern
|
||||
# Git-based Deployment Playbook with Releases/Symlink Pattern (Gitea)
|
||||
# Implements production-ready deployment with zero-downtime and rollback support
|
||||
# Uses Gitea as Git repository server with SSH-based authentication
|
||||
#
|
||||
# Prerequisites:
|
||||
# - SSH deploy key must be placed in deployment/infrastructure/secrets/gitea_deploy_key
|
||||
# - Deploy key must be added to Gitea repository or user account
|
||||
#
|
||||
# Usage:
|
||||
# ansible-playbook -i inventories/production/hosts.yml playbooks/deploy-git-based.yml
|
||||
@@ -23,9 +28,11 @@
|
||||
shared_path: "{{ app_base_path }}/shared"
|
||||
current_path: "{{ app_base_path }}/current"
|
||||
|
||||
# Git configuration
|
||||
git_repo: "https://github.com/michaelschiemer/michaelschiemer.git"
|
||||
# Git configuration (Gitea)
|
||||
# Use localhost for local testing, git.michaelschiemer.de for production
|
||||
git_repo: "git@localhost:michael/michaelschiemer.git"
|
||||
git_branch: "{{ release_tag | default('main') }}"
|
||||
git_ssh_key: "/home/{{ app_user }}/.ssh/gitea_deploy_key"
|
||||
|
||||
# Release configuration
|
||||
release_timestamp: "{{ ansible_date_time.epoch }}"
|
||||
@@ -47,7 +54,72 @@
|
||||
shared_files:
|
||||
- .env.production
|
||||
|
||||
pre_tasks:
|
||||
tasks:
|
||||
# ==========================================
|
||||
# 1. SSH Key Setup for Gitea Access
|
||||
# ==========================================
|
||||
|
||||
- name: Create .ssh directory for deploy user
|
||||
file:
|
||||
path: "/home/{{ app_user }}/.ssh"
|
||||
state: directory
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
mode: '0700'
|
||||
|
||||
- name: Copy Gitea deploy SSH private key
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/../secrets/gitea_deploy_key"
|
||||
dest: "{{ git_ssh_key }}"
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
mode: '0600'
|
||||
|
||||
- name: Copy Gitea deploy SSH public key
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/../secrets/gitea_deploy_key.pub"
|
||||
dest: "{{ git_ssh_key }}.pub"
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
mode: '0644'
|
||||
|
||||
- name: Configure SSH for Gitea (disable StrictHostKeyChecking)
|
||||
blockinfile:
|
||||
path: "/home/{{ app_user }}/.ssh/config"
|
||||
create: yes
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
mode: '0600'
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK - Gitea SSH Config"
|
||||
block: |
|
||||
Host localhost
|
||||
HostName localhost
|
||||
Port 2222
|
||||
User git
|
||||
IdentityFile {{ git_ssh_key }}
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile /dev/null
|
||||
|
||||
Host git.michaelschiemer.de
|
||||
HostName git.michaelschiemer.de
|
||||
Port 2222
|
||||
User git
|
||||
IdentityFile {{ git_ssh_key }}
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile /dev/null
|
||||
|
||||
# ==========================================
|
||||
# 2. Directory Structure Setup
|
||||
# ==========================================
|
||||
|
||||
- name: Create base application directory
|
||||
file:
|
||||
path: "{{ app_base_path }}"
|
||||
state: directory
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Check if deployment lock exists
|
||||
stat:
|
||||
path: "{{ app_base_path }}/.deploy.lock"
|
||||
@@ -74,19 +146,6 @@
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
|
||||
tasks:
|
||||
# ==========================================
|
||||
# 1. Directory Structure Setup
|
||||
# ==========================================
|
||||
|
||||
- name: Create base application directory
|
||||
file:
|
||||
path: "{{ app_base_path }}"
|
||||
state: directory
|
||||
owner: "{{ app_user }}"
|
||||
group: "{{ app_group }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Create releases directory
|
||||
file:
|
||||
path: "{{ releases_path }}"
|
||||
|
||||
Reference in New Issue
Block a user