2025-07-11 23:07:32 -04:00

27 lines
1.1 KiB
YAML

# TODO: Once I set up the mysql role set it up here
- name: Container data
ansible.builtin.include_role:
role: docker/container-data
vars:
dir_name: "{{ ghost_instance_name }}-data"
- name: Deploy Ghost CMS
community.docker.docker_container:
name: "{{ ghost_instance_name }}"
image: ghost:5-alpine
restart_policy: always
ports:
- "{{ port }}:2368"
env:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: 10.89.0.102
database__connection__user: root
database__connection__password: rootpassword
database__connection__database: "{{ database_name }}"
# this url value is just an example, and is likely wrong for your environment!
url: "{{ blog_url }}"
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development
volumes:
- "{{ container_data_base_path }}/{{ ghost_instance_name }}-data:/var/lib/ghost/content"