Added docker baserow role

This commit is contained in:
Kevin Veen-Birkenbach 2023-09-02 18:09:06 +02:00
parent 5a7141ab12
commit 8f715f8d81
7 changed files with 73 additions and 0 deletions

View File

@ -182,6 +182,14 @@
domain: "tickets.{{top_domain}}"
http_port: 8015
mail_interface_http_port: 8016
- name: setup baserow hosts
hosts: baserow
become: true
roles:
- role: docker-baserow
vars:
domain: baserow.{{top_domain}}
http_port: 8017
- name: setup akaunting hosts
hosts: akaunting
become: true

View File

@ -0,0 +1,5 @@
# docker baserow
This role allows the setup of [baserole](https://baserow.io/).
It was created with the help of [Chat GPT-4](https://chat.openai.com/share/556c2d7f-6b6f-4256-a646-a50529554efc).

View File

@ -0,0 +1,8 @@
---
- name: recreate baserow
command:
cmd: docker-compose -p baserow up -d --force-recreate
chdir: "{{path_docker_compose_files}}baserow/"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600

View File

@ -0,0 +1,25 @@
---
- name: recieve {{domain}} certificate
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
- name: configure {{domain}}.conf
template: src=roles/docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
- name: "create {{docker_compose_path}}"
file:
path: "{{docker_compose_path}}"
state: directory
mode: 0755
- name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
notify: recreate baserow
- name: add env
template:
src: env.j2
dest: "{{docker_compose_path}}env"
mode: '770'
force: yes
notify: recreate baserow

View File

@ -0,0 +1,16 @@
version: '2'
services:
baserow:
image: baserow/baserow:1.19.1
restart: always
logging:
driver: journald
env_file:
- ./env
volumes:
- baserow_data:/baserow/data
ports:
- "{{http_port}}:80"
volumes:
baserow_data:

View File

@ -0,0 +1,10 @@
# Public URL
BASEROW_PUBLIC_URL=https://{{ domain }}
# Email Server Configuration
EMAIL_SMTP=True
EMAIL_SMTP_HOST={{ system_email_host }}
EMAIL_SMTP_PORT={{ system_email_port }}
EMAIL_SMTP_USER={{ system_email_username }}
EMAIL_SMTP_PASSWORD={{ system_email_password }}
EMAIL_SMTP_USE_TLS=tls

View File

@ -0,0 +1 @@
docker_compose_path: "{{path_docker_compose_files}}baserow/"