chore: complete update
This commit is contained in:
23
x_ansible/roles/php/defaults/main.yml
Normal file
23
x_ansible/roles/php/defaults/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# Standardwerte für die PHP-Rolle
|
||||
---
|
||||
# Standardwerte für die PHP-Rolle
|
||||
|
||||
# PHP-Version
|
||||
php_version: "8.1"
|
||||
|
||||
# PHP-Erweiterungen
|
||||
php_extensions:
|
||||
- zip
|
||||
- pdo
|
||||
- pdo_mysql
|
||||
- opcache
|
||||
# PHP-Version
|
||||
php_version: "8.4"
|
||||
|
||||
# Deployment-Verzeichnisse
|
||||
deploy_root: /var/www/michaelschiemer
|
||||
deploy_public: "{{ deploy_root }}/public"
|
||||
|
||||
# Benutzer
|
||||
deploy_user: "{{ ansible_user | default('deploy') }}"
|
||||
33
x_ansible/roles/php/tasks/main.yml
Normal file
33
x_ansible/roles/php/tasks/main.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
# PHP Installation und Konfiguration
|
||||
|
||||
- name: Stelle sicher, dass das PHP-Docker-Verzeichnis existiert
|
||||
file:
|
||||
path: "{{ deploy_root }}/docker/php"
|
||||
state: directory
|
||||
owner: "{{ deploy_user }}"
|
||||
group: "{{ deploy_user }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Erstelle einfache PHP-Dockerfile
|
||||
copy:
|
||||
dest: "{{ deploy_root }}/docker/php/Dockerfile-simple"
|
||||
content: |
|
||||
FROM php:8.1-fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
zip \
|
||||
&& docker-php-ext-install zip pdo pdo_mysql \
|
||||
&& docker-php-ext-install opcache \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
CMD ["php-fpm"]
|
||||
owner: "{{ deploy_user }}"
|
||||
group: "{{ deploy_user }}"
|
||||
mode: '0644'
|
||||
Reference in New Issue
Block a user