Finalise privatebin service setup

This commit is contained in:
Jesper Hess 2019-02-13 10:05:00 +01:00
parent ca183eaf4d
commit 26792454f4
Signed by untrusted user: graffen
GPG key ID: 351A89E40D763F0F
2 changed files with 20 additions and 4 deletions

View file

@ -22,6 +22,11 @@
name: "docker-compose"
state: present
- name: create folder structure for bind mounts
file:
name: "{{ volume_root_folder }}"
state: directory
- name: setup services
import_tasks: services.yml
tags:

View file

@ -1,7 +1,17 @@
---
- name: privatebin volume
docker_volume:
name: privatebin
- name: create privatebin volume folders
file:
name: "{{ privatebin.volume_folder }}/{{ item }}"
state: directory
with_items:
- cfg
- data
- name: upload privatebin config
template:
src: files/configs/privatebin-conf.php
dest: "{{ privatebin.volume_folder }}/cfg/conf.php"
- name: privatebin app container
docker_container:
@ -9,7 +19,8 @@
image: jgeusebroek/privatebin:latest
restart_policy: unless-stopped
volumes:
- privatebin:/privatebin
- "{{ privatebin.volume_folder }}/cfg:/privatebin/cfg"
- "{{ privatebin.volume_folder }}/data:/privatebin/data"
networks:
- name: external_services
env: