php-fpm.yml 959 B

123456789101112131415161718192021222324252627282930
  1. - name: Upload php-fpm.sh
  2. ansible.builtin.template:
  3. src: containers/php-fpm.sh.j2
  4. dest: "{{ app_deploy_target }}/scripts/php-fpm.sh"
  5. mode: "0555"
  6. - name: Stop php-fpm worker
  7. containers.podman.podman_container:
  8. name: "{{ app_domain }}-fpm-{{ app_php_fpm_port }}"
  9. state: absent
  10. - name: Create php-fpm worker
  11. containers.podman.podman_container:
  12. name: "{{ app_domain }}-fpm-{{ app_php_fpm_port }}"
  13. image: "{{ app_mint_image_name }}"
  14. command: "{{ app_deploy_target }}/scripts/php-fpm.sh"
  15. ports:
  16. - "0.0.0.0:{{ app_php_fpm_port }}:9000/tcp"
  17. volumes:
  18. - "{{ app_deploy_target }}:{{ app_deploy_target }}:z"
  19. workdir: "{{ app_deploy_target }}"
  20. # auto_remove: true
  21. state: present
  22. generate_systemd:
  23. path: "{{ ansible_env.HOME }}/.config/systemd/user"
  24. container_prefix: "{{ app_container_prefix }}"
  25. new: true
  26. names: true
  27. restart_policy: always
  28. stop_timeout: 120