28 lines
864 B
YAML
28 lines
864 B
YAML
# vim: ft=yaml.ansible
|
|
---
|
|
- name: Create samsapti.dev volume directories
|
|
ansible.builtin.file:
|
|
path: "{{ services.samsapti_dev.volume }}/public"
|
|
owner: cicd
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- name: Deploy samsapti.dev Docker container
|
|
community.docker.docker_container:
|
|
name: samsapti.dev
|
|
state: "{{ 'absent' if down is defined and down else 'started' }}"
|
|
restart: "{{ restart is defined and restart }}"
|
|
recreate: "{{ recreate is defined and recreate }}"
|
|
image: nginx:{{ services.samsapti_dev.version }}
|
|
restart_policy: always
|
|
networks:
|
|
- name: services
|
|
aliases:
|
|
- samsapti
|
|
- name: tor
|
|
aliases:
|
|
- samsapti
|
|
volumes:
|
|
- "{{ services.samsapti_dev.volume }}/public:/usr/share/nginx/html:ro"
|
|
- "{{ base_volume }}/nginx.conf:/etc/nginx/nginx.conf:ro"
|