Files
MyMovieDB/deploy_remote.yml
jonnybravo 523d549f65
Some checks failed
Deploy to ras-dan-01 / deploy (push) Failing after -1m24s
try
2025-08-26 14:51:33 +02:00

50 lines
1.1 KiB
YAML

---
- name: Deploy and start Movie-DB Application
hosts: all
become: False
gather_facts: True
vars:
project_name: movie-db
install_dir: "/opt/{{ project_name }}"
tasks:
- name: Create installation directory
ansible.builtin.file:
path: "{{ install_dir }}"
state: directory
mode: '0755'
- name: Copy project files
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ install_dir }}/"
owner: root
group: root
mode: '0644'
with_items:
- cert.pem
- docker-compose.yml
- Dockerfile
- genre_list
- imdb_suche.py
- key.pem
- main.py
- moviedb_func.py
- regie_name.csv
- requirements.txt
- name: Copy templates directory
ansible.builtin.copy:
src: templates/
dest: "{{ install_dir }}/templates/"
owner: root
group: root
- name: Start application with Docker Compose
community.docker.docker_compose_v2:
project_src: "{{ install_dir }}"
state: present
restarted: yes
build: yes