mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
initial cleanup server-manager
This commit is contained in:
47
roles/docker-mybb/tasks/main.yml
Normal file
47
roles/docker-mybb/tasks/main.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
- 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/native-nginx-docker-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
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:
|
||||
image: mybb/mybb:latest
|
||||
restart: always
|
||||
links:
|
||||
- database
|
||||
volumes:
|
||||
- mybb-data:/var/www/html
|
||||
server:
|
||||
links:
|
||||
- application
|
||||
image: nginx:mainline
|
||||
restart: always
|
||||
ports:
|
||||
- "{{http_port}}:80"
|
||||
volumes:
|
||||
- "{{conf_d_docker_path}}:{{conf_d_path}}"
|
||||
- "mybb-data:/var/www/html:ro"
|
||||
database:
|
||||
image: mariadb
|
||||
environment:
|
||||
MYSQL_DATABASE: "mybb"
|
||||
MYSQL_USER: "mybb"
|
||||
MYSQL_PASSWORD: "{{mybb_database_password}}"
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||
volumes:
|
||||
- mybb-database:/var/lib/mysql
|
||||
restart: always
|
Reference in New Issue
Block a user