computer-playbook/roles/docker-mybb/tasks/main.yml

51 lines
1.4 KiB
YAML
Raw Normal View History

2020-12-24 14:27:31 +01:00
---
- 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
2023-09-02 13:13:28 +02:00
template: src=roles/docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
2020-12-24 14:27:31 +01:00
notify: restart nginx
- name: create data folder
file:
path: "{{conf_d_docker_path}}"
state: directory
- name: "create {{default_conf_docker_path}}"
template: src="default.conf" dest="{{default_conf_docker_path}}"
- name: "setup mybb"
docker_compose:
project_name: mybb
definition:
application:
2020-12-31 15:50:05 +01:00
log_driver: journald
2020-12-24 14:27:31 +01:00
image: mybb/mybb:latest
restart: always
links:
- database
volumes:
- mybb-data:/var/www/html
server:
2020-12-31 15:50:05 +01:00
log_driver: journald
2020-12-24 14:27:31 +01:00
links:
- application
image: nginx:mainline
restart: always
ports:
2020-12-27 23:12:09 +01:00
- "127.0.0.1:{{http_port}}:80"
2020-12-24 14:27:31 +01:00
volumes:
- "{{conf_d_docker_path}}:{{conf_d_path}}"
- "mybb-data:/var/www/html:ro"
database:
2020-12-31 15:50:05 +01:00
log_driver: journald
2020-12-24 14:27:31 +01:00
image: mariadb
environment:
MYSQL_DATABASE: "mybb"
MYSQL_USER: "mybb"
MYSQL_PASSWORD: "{{mybb_database_password}}"
2023-04-15 18:11:25 +02:00
MARIADB_AUTO_UPGRADE: "1"
2020-12-24 14:27:31 +01:00
volumes:
- mybb-database:/var/lib/mysql
restart: always