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" name: "docker-compose"
state: present state: present
- name: create folder structure for bind mounts
file:
name: "{{ volume_root_folder }}"
state: directory
- name: setup services - name: setup services
import_tasks: services.yml import_tasks: services.yml
tags: tags:

View file

@ -1,7 +1,17 @@
--- ---
- name: privatebin volume
docker_volume: - name: create privatebin volume folders
name: privatebin 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 - name: privatebin app container
docker_container: docker_container:
@ -9,7 +19,8 @@
image: jgeusebroek/privatebin:latest image: jgeusebroek/privatebin:latest
restart_policy: unless-stopped restart_policy: unless-stopped
volumes: volumes:
- privatebin:/privatebin - "{{ privatebin.volume_folder }}/cfg:/privatebin/cfg"
- "{{ privatebin.volume_folder }}/data:/privatebin/data"
networks: networks:
- name: external_services - name: external_services
env: env: