Removed server_ for better overview

This commit is contained in:
2023-08-22 22:53:44 +02:00
parent 571bed27a3
commit 4254642313
246 changed files with 45 additions and 45 deletions

View File

@@ -0,0 +1,7 @@
# role mybb
## install plugins
Extract the plugins to /mnt.
Execute:
```bash
docker run --rm -v mybb-data:/target/ -v /mnt/:/origin/ "kevinveenbirkenbach/alpine-rsync" sh -c "rsync -avv /origin/inc/plugins/ /target/"
```

View File

@@ -0,0 +1,5 @@
---
conf_d_path: "/etc/nginx/conf.d/"
#default_conf_path: "/etc/nginx/nginx.conf"
conf_d_docker_path: "/etc/docker/applications/mybb{{conf_d_path}}"
default_conf_docker_path: "{{conf_d_docker_path}}default.conf"

View File

@@ -0,0 +1,2 @@
dependencies:
- server_native-docker-reverse-proxy

View File

@@ -0,0 +1,50 @@
---
- 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/server_native-docker-reverse-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:
log_driver: journald
image: mybb/mybb:latest
restart: always
links:
- database
volumes:
- mybb-data:/var/www/html
server:
log_driver: journald
links:
- application
image: nginx:mainline
restart: always
ports:
- "127.0.0.1:{{http_port}}:80"
volumes:
- "{{conf_d_docker_path}}:{{conf_d_path}}"
- "mybb-data:/var/www/html:ro"
database:
log_driver: journald
image: mariadb
environment:
MYSQL_DATABASE: "mybb"
MYSQL_USER: "mybb"
MYSQL_PASSWORD: "{{mybb_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- mybb-database:/var/lib/mysql
restart: always

View File

@@ -0,0 +1,32 @@
upstream mybb {
server application:9000 weight=5;
}
server {
listen 80;
root /var/www/html;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ inc/ {
internal;
}
location ~ ^/(images|cache|jscripts|uploads)/ {
access_log off;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass mybb;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}