Moved printing into its own separate project called frank. It also has its own toml and deployement system.

It also works on a raspberry pi
This commit is contained in:
2021-03-23 18:18:33 +05:30
parent 0b30ce258c
commit f4caa19bb2
17 changed files with 184 additions and 67 deletions

38
docker/playbook-frank.yml Executable file
View File

@ -0,0 +1,38 @@
#################################################
# DO Community Playbooks: Docker
#################################################
---
- hosts: all
become: true
vars_files:
- vars/frank.yml
tasks:
- name: Copy dockerfile
synchronize: src=app dest=/tmp
- name: Build frank image
docker_image:
name: frank:latest
build:
path: /tmp/app/
dockerfile: /tmp/app/frank.Dockerfile
pull: yes
state: present
source: build
- name: Upload the worker .env file
template:
src: "files/frank.env"
dest: "/home/pi/frank.env"
- name: Create frank worker container
docker_container:
name: "frank"
image: frank:latest
state: started
restart_policy: "unless-stopped"
env_file: "/home/pi/frank.env"
network_mode: "host"
devices:
- "{{ printer_port }}:/printer"