Add portainer.

This commit is contained in:
Víðir Valberg Guðmundsson 2019-03-15 12:38:36 +01:00
parent 59319938b8
commit 8b10f40edd
3 changed files with 28 additions and 0 deletions

View file

@ -25,6 +25,7 @@
- websites - websites
- ouroboros - ouroboros
- mailu - mailu
- portainer
smtp_host: "postfix" smtp_host: "postfix"
smtp_port: "587" smtp_port: "587"

View file

@ -65,3 +65,7 @@ mailu:
subnet: 192.168.203.0/24 subnet: 192.168.203.0/24
volume_folder: "{{ volume_root_folder }}/mailu" volume_folder: "{{ volume_root_folder }}/mailu"
portainer:
domain: "portainer.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/portainer"

View file

@ -0,0 +1,23 @@
---
- name: create portainer volume folder
file:
name: "{{ portainer.volume_folder }}"
state: directory
- name: run portainer
docker_container:
name: portainer
image: portainer/portainer
restart_policy: always
networks:
- name: external_services
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "{{ portainer.volume_folder }}:/data"
published_ports:
- 9001:9000
env:
VIRTUAL_HOST: "{{ portainer.domain }}"
LETSENCRYPT_HOST: "{{ portainer.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"