feat: add basic opencloud deployment
Signed-off-by: Bert-Jan Fikse <bert-jan@whatwedo.ch>
This commit is contained in:
parent
6fad15e7ed
commit
59cd27a031
4 changed files with 100 additions and 0 deletions
44
roles/opencloud/templates/docker-compose.yml.j2
Normal file
44
roles/opencloud/templates/docker-compose.yml.j2
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
services:
|
||||
opencloud:
|
||||
image: {{ opencloud_image }}
|
||||
container_name: {{ opencloud_service_name }}
|
||||
restart: unless-stopped
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
command: ["-c", "opencloud init || true; opencloud server"]
|
||||
volumes:
|
||||
- {{ opencloud_docker_volume_dir }}/config:/etc/ocis
|
||||
- {{ opencloud_docker_volume_dir }}/data:/var/lib/ocis
|
||||
environment:
|
||||
{% if opencloud_use_ssl %}
|
||||
OC_URL: "https://{{ opencloud_domain }}"
|
||||
{% else %}
|
||||
OC_URL: "http://{{ opencloud_domain }}"
|
||||
{% endif %}
|
||||
OC_INSECURE: "true"
|
||||
OC_LOG_LEVEL: "{{ opencloud_log_level }}"
|
||||
PROXY_TLS: "false"
|
||||
IDM_ADMIN_PASSWORD: "{{ opencloud_admin_password }}"
|
||||
networks:
|
||||
- {{ opencloud_traefik_network }}
|
||||
{% if opencloud_extra_hosts is defined and opencloud_extra_hosts | length > 0 %}
|
||||
extra_hosts:
|
||||
{% for host in opencloud_extra_hosts %}
|
||||
- "{{ host }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network={{ opencloud_traefik_network }}
|
||||
- traefik.http.routers.{{ opencloud_service_name }}.rule=Host(`{{ opencloud_domain }}`)
|
||||
{% if opencloud_use_ssl %}
|
||||
- traefik.http.routers.{{ opencloud_service_name }}.entrypoints=websecure
|
||||
- traefik.http.routers.{{ opencloud_service_name }}.tls=true
|
||||
{% else %}
|
||||
- traefik.http.routers.{{ opencloud_service_name }}.entrypoints=web
|
||||
{% endif %}
|
||||
- traefik.http.services.{{ opencloud_service_name }}.loadbalancer.server.port={{ opencloud_port }}
|
||||
|
||||
networks:
|
||||
{{ opencloud_traefik_network }}:
|
||||
external: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue