mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-24 05:31:04 +01:00
Compare commits
No commits in common. "ba1dd33ebdcd6052d86bc244c53c00648377581b" and "430bb17b0bf1ee03e09ab83400e415b634d8ac9f" have entirely different histories.
ba1dd33ebd
...
430bb17b0b
@ -205,14 +205,6 @@
|
||||
vars:
|
||||
domain: matomo.{{top_domain}}
|
||||
http_port: 8018
|
||||
- name: setup listmonk
|
||||
hosts: listmonk
|
||||
become: true
|
||||
roles:
|
||||
- role: docker-listmonk
|
||||
vars:
|
||||
domain: listmonk.{{top_domain}}
|
||||
http_port: 8019
|
||||
- name: setup akaunting hosts
|
||||
hosts: akaunting
|
||||
become: true
|
||||
|
@ -81,7 +81,7 @@ Detailed steps for backing up your Akaunting instance, including setting manual
|
||||
### Setting Variables
|
||||
Variables are crucial in configuring your Akaunting setup. Ensure you set the following variables correctly in your environment:
|
||||
|
||||
- `docker_compose_instance_directory`: Set this variable to the path where your Docker Compose files for Akaunting are located.
|
||||
- `docker_compose_akaunting_path`: Set this variable to the path where your Docker Compose files for Akaunting are located.
|
||||
- `akaunting_db_password`, `akaunting_version`, `akaunting_company_name`, `akaunting_company_email`, `akaunting_setup_admin_email`, and `akaunting_setup_admin_password`: These should be set in your `.env` files as per your requirements.
|
||||
|
||||
### Additional Configuration
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: setup akaunting
|
||||
command:
|
||||
cmd: docker-compose -p akaunting up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_akaunting_path}}"
|
||||
environment:
|
||||
#AKAUNTING_SETUP: true
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
|
@ -8,20 +8,20 @@
|
||||
|
||||
- name: register directory
|
||||
stat:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
register: docker_compose_instance_directory_register
|
||||
path: "{{docker_compose_akaunting_path}}"
|
||||
register: docker_compose_akaunting_path_register
|
||||
|
||||
- name: checkout repository
|
||||
ansible.builtin.shell: git checkout .
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
when: docker_compose_instance_directory_register.stat.exists
|
||||
chdir: "{{docker_compose_akaunting_path}}"
|
||||
when: docker_compose_akaunting_path_register.stat.exists
|
||||
|
||||
- name: pull docker repository
|
||||
git:
|
||||
repo: "https://github.com/akaunting/docker.git"
|
||||
dest: "{{docker_compose_instance_directory}}"
|
||||
dest: "{{docker_compose_akaunting_path}}"
|
||||
update: yes
|
||||
notify: setup akaunting
|
||||
become: true
|
||||
@ -37,12 +37,12 @@
|
||||
ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{akaunting_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{akaunting_version}}/' {} +
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_akaunting_path}}"
|
||||
|
||||
- name: configure db.env
|
||||
template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env
|
||||
template: src=db.env.j2 dest={{docker_compose_akaunting_path}}/env/db.env
|
||||
notify: setup akaunting
|
||||
|
||||
- name: configure run.env
|
||||
template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env
|
||||
template: src=run.env.j2 dest={{docker_compose_akaunting_path}}/env/run.env
|
||||
notify: setup akaunting
|
||||
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}akaunting/"
|
||||
docker_compose_akaunting_path: "{{path_docker_compose_files}}akaunting/"
|
||||
|
@ -22,20 +22,20 @@
|
||||
|
||||
- name: register directory
|
||||
stat:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
register: docker_compose_instance_directory_register
|
||||
path: "{{docker_compose_attendize_path}}"
|
||||
register: docker_compose_attendize_path_register
|
||||
|
||||
- name: checkout repository
|
||||
ansible.builtin.shell: git checkout .
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
when: docker_compose_instance_directory_register.stat.exists
|
||||
chdir: "{{docker_compose_attendize_path}}"
|
||||
when: docker_compose_attendize_path_register.stat.exists
|
||||
|
||||
- name: checkout Attendize repository
|
||||
ansible.builtin.git:
|
||||
repo: "https://github.com/Attendize/Attendize.git"
|
||||
dest: "{{docker_compose_instance_directory}}"
|
||||
dest: "{{docker_compose_attendize_path}}"
|
||||
version: master
|
||||
become: true
|
||||
|
||||
@ -47,5 +47,5 @@
|
||||
- name: create docker-compose.yml file from template
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{docker_compose_instance_directory}}/docker-compose.yml"
|
||||
dest: "{{docker_compose_attendize_path}}/docker-compose.yml"
|
||||
mode: 0644
|
@ -1,3 +1,3 @@
|
||||
---
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}attendize/"
|
||||
docker_compose_attendize_path: "{{path_docker_compose_files}}attendize/"
|
||||
mail_interface_domain: "mail.{{domain}}"
|
||||
|
@ -6,20 +6,20 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}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_instance_directory}}env"
|
||||
dest: "{{docker_compose_path}}env"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: recreate baserow
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}baserow/"
|
||||
docker_compose_path: "{{path_docker_compose_files}}baserow/"
|
@ -2,7 +2,7 @@
|
||||
- name: create docker-compose.yml for bigbluebutton
|
||||
command:
|
||||
cmd: bash ./scripts/generate-compose
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_bigbluebutton_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
@ -10,7 +10,7 @@
|
||||
- name: docker compose up bigbluebutton
|
||||
command:
|
||||
cmd: docker-compose -p bigbluebutton up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_bigbluebutton_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -9,7 +9,7 @@
|
||||
- name: pull docker repository
|
||||
git:
|
||||
repo: "https://github.com/bigbluebutton/docker.git"
|
||||
dest: "{{docker_compose_instance_directory}}"
|
||||
dest: "{{docker_compose_bigbluebutton_path}}"
|
||||
update: yes
|
||||
recursive: yes
|
||||
version: main
|
||||
@ -23,5 +23,5 @@
|
||||
when: git_result.failed
|
||||
|
||||
- name: deploy .env
|
||||
template: src=env.j2 dest={{docker_compose_instance_directory}}/.env
|
||||
template: src=env.j2 dest={{docker_compose_bigbluebutton_path}}/.env
|
||||
notify: setup bigbluebutton
|
||||
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}bigbluebutton/"
|
||||
docker_compose_bigbluebutton_path: "{{path_docker_compose_files}}bigbluebutton/"
|
@ -2,7 +2,7 @@
|
||||
- name: recreate funkwhale
|
||||
command:
|
||||
cmd: docker-compose -p funkwhale up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -6,20 +6,20 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
|
||||
notify: recreate funkwhale
|
||||
|
||||
- name: add .env
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{docker_compose_instance_directory}}.env"
|
||||
dest: "{{docker_compose_path}}.env"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: recreate funkwhale
|
@ -1,2 +1,2 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}funkwhale/"
|
||||
docker_compose_path: "{{path_docker_compose_files}}funkwhale/"
|
||||
client_max_body_size: "512M"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## update
|
||||
```bash
|
||||
cd {{docker_compose_instance_directory}}
|
||||
cd {{path_docker_compose_folder}}
|
||||
docker-compose down
|
||||
docker-compose pull
|
||||
docker-compose up -d
|
||||
@ -17,7 +17,7 @@ Keep in mind to track and to don't interrupt the update process until the migrat
|
||||
|
||||
## recreate
|
||||
```bash
|
||||
cd {{docker_compose_instance_directory}} && docker-compose -p gitea up -d --force-recreate
|
||||
cd {{path_docker_compose_folder}} && docker-compose -p gitea up -d --force-recreate
|
||||
```
|
||||
|
||||
## database access
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: recreate gitea
|
||||
command:
|
||||
cmd: docker-compose -p gitea up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{path_docker_compose_folder}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -6,12 +6,12 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{path_docker_compose_folder}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{path_docker_compose_folder}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{path_docker_compose_folder}}docker-compose.yml
|
||||
notify: recreate gitea
|
||||
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}gitea/"
|
||||
path_docker_compose_folder: "{{path_docker_compose_files}}gitea/"
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: recreate joomla
|
||||
command:
|
||||
cmd: docker-compose -p joomla up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{path_docker_compose_folder}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -6,12 +6,12 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{path_docker_compose_folder}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{path_docker_compose_folder}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{path_docker_compose_folder}}docker-compose.yml
|
||||
notify: recreate joomla
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}joomla/"
|
||||
path_docker_compose_folder: "{{path_docker_compose_files}}joomla/"
|
||||
|
@ -1,49 +0,0 @@
|
||||
# Docker Listmonk Role
|
||||
|
||||
This role deploys the Listmonk application using Docker. Listmonk is a high performance, self-hosted newsletter and mailing list manager with a modern dashboard.
|
||||
|
||||
## Prerequisites
|
||||
- Docker and Docker Compose should be installed on your system.
|
||||
- Make sure that the required ports are available and not used by other services.
|
||||
|
||||
## Installation and Configuration
|
||||
|
||||
1. **Clone the Repository**:
|
||||
- Ensure you have the latest version of this playbook from the repository.
|
||||
|
||||
2. **Configure Variables**:
|
||||
- Set your desired configurations in `vars/main.yml`. This includes the path to your Docker Compose files and any other relevant variables.
|
||||
|
||||
3. **Run the Playbook**:
|
||||
- Execute the ansible playbook to set up Listmonk.
|
||||
|
||||
4. **Initial Database Setup**:
|
||||
- After the first setup, run the following command to initialize the Listmonk database:
|
||||
```bash
|
||||
docker compose run --rm application ./listmonk --install
|
||||
```
|
||||
|
||||
5. **Configure Reverse Proxy** (Optional):
|
||||
- If you are using a reverse proxy, configure it as per your domain settings in the `nginx-docker-reverse-proxy` role.
|
||||
|
||||
6. **Start Services**:
|
||||
- Use the following command to start Listmonk services:
|
||||
```bash
|
||||
docker-compose -p listmonk up -d --force-recreate
|
||||
```
|
||||
|
||||
## Configuration Files
|
||||
|
||||
- **docker-compose.yml**: Defines the Docker setup for Listmonk and its database.
|
||||
- **config.toml**: Contains the application settings including the database connection, admin credentials, and server settings.
|
||||
|
||||
## Further Information
|
||||
- For detailed installation instructions and configuration options, visit the [Listmonk Installation Documentation](https://listmonk.app/docs/installation/).
|
||||
- You can also find more information on the [Listmonk GitHub Repository](https://github.com/knadh/listmonk/).
|
||||
|
||||
## Dependencies
|
||||
- This role depends on `nginx-docker-reverse-proxy` for setting up a reverse proxy for Listmonk.
|
||||
|
||||
## Developed with AI
|
||||
This Docker Listmonk role was developed with assistance from ChatGPT, a conversational AI by OpenAI. The conversation and guidance provided by ChatGPT can be found [here](https://chat.openai.com/share/95e722f5-3bd9-4203-8755-def2eca4796e).
|
||||
|
@ -1,2 +1,2 @@
|
||||
dependencies:
|
||||
- nginx-docker-reverse-proxy
|
||||
- docker-reverse-proxy
|
||||
|
@ -4,24 +4,18 @@
|
||||
|
||||
- name: configure {{domain}}.conf
|
||||
template:
|
||||
src: "roles/nginx-docker-reverse-proxy/templates/domain.conf.j2"
|
||||
src: "roles/docker-reverse-proxy/templates/domain.conf.j2"
|
||||
dest: "/etc/nginx/conf.d/{{domain}}.conf"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{path_docker_compose_files}}listmonk/"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{path_docker_compose_files}}listmonk/"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
dest: "{{path_docker_compose_files}}listmonk/docker-compose.yml"
|
||||
notify: recreate listmonk
|
||||
|
||||
- name: add config.toml
|
||||
template:
|
||||
src: "config.toml.j2"
|
||||
dest: "{{docker_compose_instance_directory}}config.toml"
|
||||
notify: recreate listmonk
|
@ -1,23 +1,23 @@
|
||||
[app]
|
||||
# Interface and port where the application will run its webserver. The default value
|
||||
# Interface and port where the app will run its webserver. The default value
|
||||
# of localhost will only listen to connections from the current machine. To
|
||||
# listen on all interfaces use '0.0.0.0'. To listen on the default web address
|
||||
# port, use port 80 (this will require running with elevated permissions).
|
||||
address = "0.0.0.0:9000"
|
||||
address = "localhost:9000"
|
||||
|
||||
# BasicAuth authentication for the admin dashboard. This will eventually
|
||||
# be replaced with a better multi-user, role-based authentication system.
|
||||
# IMPORTANT: Leave both values empty to disable authentication on admin
|
||||
# only where an external authentication is already setup.
|
||||
admin_username = "{{listmonk_admin_username}}"
|
||||
admin_password = "{{listmonk_admin_password}}"
|
||||
admin_username = "listmonk"
|
||||
admin_password = "listmonk"
|
||||
|
||||
# Database.
|
||||
[db]
|
||||
host = "database"
|
||||
host = "localhost"
|
||||
port = 5432
|
||||
user = "listmonk"
|
||||
password = "{{listmonk_database_password}}"
|
||||
password = "listmonk"
|
||||
|
||||
# Ensure that this database has been created in Postgres.
|
||||
database = "listmonk"
|
@ -4,24 +4,24 @@
|
||||
|
||||
version: "3.7"
|
||||
|
||||
x-application-defaults: &application-defaults
|
||||
x-app-defaults: &app-defaults
|
||||
restart: unless-stopped
|
||||
image: listmonk/listmonk:latest
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:9000"
|
||||
- "9000:9000"
|
||||
networks:
|
||||
- listmonk
|
||||
environment:
|
||||
- TZ=Etc/UTC
|
||||
|
||||
x-database-defaults: &database-defaults
|
||||
image: postgres:13-alpine
|
||||
x-db-defaults: &db-defaults
|
||||
image: postgres:13
|
||||
ports:
|
||||
- "9432:5432"
|
||||
networks:
|
||||
- listmonk
|
||||
environment:
|
||||
- POSTGRES_PASSWORD={{listmonk_database_password}}
|
||||
- POSTGRES_PASSWORD=listmonk
|
||||
- POSTGRES_USER=listmonk
|
||||
- POSTGRES_DB=listmonk
|
||||
restart: unless-stopped
|
||||
@ -32,22 +32,21 @@ x-database-defaults: &database-defaults
|
||||
retries: 6
|
||||
|
||||
services:
|
||||
database:
|
||||
<<: *database-defaults
|
||||
container_name: database
|
||||
db:
|
||||
<<: *db-defaults
|
||||
container_name: listmonk_db
|
||||
volumes:
|
||||
- type: volume
|
||||
source: listmonk-data
|
||||
target: /var/lib/postgresql/data
|
||||
|
||||
application:
|
||||
<<: *application-defaults
|
||||
container_name: listmonk_application
|
||||
app:
|
||||
<<: *app-defaults
|
||||
container_name: listmonk_app
|
||||
depends_on:
|
||||
- database
|
||||
- db
|
||||
volumes:
|
||||
- ./config.toml:/listmonk/config.toml
|
||||
|
||||
networks:
|
||||
listmonk:
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}listmonk/"
|
@ -2,7 +2,7 @@
|
||||
- name: recreate mailu
|
||||
command:
|
||||
cmd: docker-compose -p mailu up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{path_docker_compose_files}}mailu/"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 900
|
||||
DOCKER_CLIENT_TIMEOUT: 900
|
||||
|
@ -36,13 +36,13 @@
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
dest: "{{path_docker_compose_files}}mailu/docker-compose.yml"
|
||||
notify: recreate mailu
|
||||
|
||||
- name: add mailu.env
|
||||
template:
|
||||
src: "mailu.env.j2"
|
||||
dest: "{{docker_compose_instance_directory}}mailu.env"
|
||||
dest: "{{path_docker_compose_files}}mailu/mailu.env"
|
||||
notify: recreate mailu
|
||||
|
||||
- name: add deploy-letsencrypt-mailu.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
cp /etc/letsencrypt/live/{{domain}}/privkey.pem /etc/mailu/certs/key.pem || exit 1
|
||||
cp /etc/letsencrypt/live/{{domain}}/fullchain.pem /etc/mailu/certs/cert.pem || exit 1
|
||||
cd {{docker_compose_instance_directory}} && docker compose exec front nginx -s reload || exit 1
|
||||
docker exec {{mailu_front_container_name}} nginx -s reload
|
||||
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}mailu/"
|
||||
mailu_front_container_name: "mailu-front-1"
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: recreate mastodon
|
||||
command:
|
||||
cmd: docker-compose -p mastodon up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_mastodon_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -6,19 +6,19 @@
|
||||
template: src=templates/mastodon.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_mastodon_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_mastodon_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: copy docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_mastodon_path}}docker-compose.yml
|
||||
notify: recreate mastodon
|
||||
|
||||
- name: copy configuration
|
||||
template:
|
||||
src: .env.production.j2
|
||||
dest: "{{docker_compose_instance_directory}}.env.production"
|
||||
dest: "{{docker_compose_mastodon_path}}.env.production"
|
||||
force: no
|
||||
notify: recreate mastodon
|
||||
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}mastodon/"
|
||||
docker_compose_mastodon_path: "{{path_docker_compose_files}}mastodon/"
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: recreate matomo
|
||||
command:
|
||||
cmd: docker-compose -p matomo up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{path_docker_compose_files}}matomo/"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -8,14 +8,14 @@
|
||||
dest: "/etc/nginx/conf.d/{{domain}}.conf"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{path_docker_compose_files}}matomo/"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{path_docker_compose_files}}matomo/"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
dest: "{{path_docker_compose_files}}matomo/docker-compose.yml"
|
||||
notify: recreate matomo
|
||||
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}matomo/"
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}mybb/"
|
||||
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"
|
||||
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: recreate mybb
|
||||
command:
|
||||
cmd: docker-compose -p mybb up -d --force-recreate
|
||||
chdir: "{{path_docker_compose_files}}mybb/"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@ -10,13 +10,41 @@
|
||||
file:
|
||||
path: "{{conf_d_docker_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: "create {{default_conf_docker_path}}"
|
||||
template: src="default.conf" dest="{{default_conf_docker_path}}"
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
notify: recreate matomo
|
||||
- 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
|
||||
|
@ -1,42 +0,0 @@
|
||||
services:
|
||||
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:
|
||||
- database:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: "/usr/bin/mariadb --user=mybb --password={{mybb_database_password}} --execute \"SHOW DATABASES;\""
|
||||
interval: 3s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
restart: always
|
||||
volumes:
|
||||
database:
|
||||
data:
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
@ -2,7 +2,7 @@
|
||||
- name: recreate nextcloud
|
||||
command:
|
||||
cmd: docker-compose -p nextcloud up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{path_docker_compose_files}}nextcloud/"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -20,14 +20,14 @@
|
||||
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
||||
notify: recreate nextcloud
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{path_docker_compose_files}}nextcloud/"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{path_docker_compose_files}}nextcloud/"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
dest: "{{path_docker_compose_files}}nextcloud/docker-compose.yml"
|
||||
notify: recreate nextcloud
|
||||
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}nextcloud/"
|
@ -2,7 +2,7 @@
|
||||
- name: recreate peertube
|
||||
command:
|
||||
cmd: docker-compose -p peertube up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_peertube_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -6,18 +6,18 @@
|
||||
template: src=templates/peertube.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_peertube_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_peertube_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: copy docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_peertube_path}}docker-compose.yml
|
||||
notify: recreate peertube
|
||||
|
||||
- name: copy configuration
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{docker_compose_instance_directory}}.env"
|
||||
dest: "{{docker_compose_peertube_path}}.env"
|
||||
notify: recreate peertube
|
||||
|
@ -1 +1 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}peertube/"
|
||||
docker_compose_peertube_path: "{{path_docker_compose_files}}peertube/"
|
||||
|
@ -6,20 +6,20 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
|
||||
notify: recreate pixelfed
|
||||
|
||||
- name: add env
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{docker_compose_instance_directory}}env"
|
||||
dest: "{{docker_compose_path}}env"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: recreate pixelfed
|
@ -1,2 +1,2 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}pixelfed/"
|
||||
docker_compose_path: "{{path_docker_compose_files}}pixelfed/"
|
||||
client_max_body_size: "512M"
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: recreate and build roulette-wheel
|
||||
command:
|
||||
cmd: docker-compose -p roulette-wheel up -d --force-recreate --build
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@ -6,9 +6,9 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
@ -28,9 +28,9 @@
|
||||
when: git_result.failed
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
|
||||
notify: recreate and build roulette-wheel
|
||||
|
||||
- name: add Dockerfile
|
||||
template: src=Dockerfile.j2 dest={{docker_compose_instance_directory}}Dockerfile
|
||||
template: src=Dockerfile.j2 dest={{docker_compose_path}}Dockerfile
|
||||
notify: recreate and build roulette-wheel
|
||||
|
@ -1,2 +1,2 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}roulette-wheel/"
|
||||
docker_compose_path: "{{path_docker_compose_files}}roulette-wheel/"
|
||||
app_path: "{{path_docker_compose_files}}roulette-wheel/app/"
|
@ -2,14 +2,14 @@
|
||||
- name: rebuild wordpress container
|
||||
command:
|
||||
cmd: docker build --no-cache -t custom_wordpress .
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_wordpress_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
- name: recreate wordpress
|
||||
command:
|
||||
cmd: docker-compose -p wordpress up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose_wordpress_path}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@ -13,28 +13,28 @@
|
||||
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ domain }}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{docker_compose_wordpress_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{docker_compose_wordpress_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: "Transfering upload.ini to {{docker_compose_instance_directory}}"
|
||||
- name: "Transfering upload.ini to {{docker_compose_wordpress_path}}"
|
||||
template:
|
||||
src: upload.ini.j2
|
||||
dest: "{{docker_compose_instance_directory}}upload.ini"
|
||||
dest: "{{docker_compose_wordpress_path}}upload.ini"
|
||||
notify:
|
||||
- recreate wordpress
|
||||
- rebuild wordpress container
|
||||
|
||||
- name: "Transfering Dockerfile to {{docker_compose_instance_directory}}"
|
||||
- name: "Transfering Dockerfile to {{docker_compose_wordpress_path}}"
|
||||
copy:
|
||||
src: Dockerfile
|
||||
dest: "{{docker_compose_instance_directory}}Dockerfile"
|
||||
dest: "{{docker_compose_wordpress_path}}Dockerfile"
|
||||
notify:
|
||||
- recreate wordpress
|
||||
- rebuild wordpress container
|
||||
|
||||
- name: "add docker-compose.yml to {{docker_compose_instance_directory}}"
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
- name: "add docker-compose.yml to {{docker_compose_wordpress_path}}"
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_wordpress_path}}docker-compose.yml
|
||||
notify: recreate wordpress
|
||||
|
@ -1,2 +1,2 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}wordpress/"
|
||||
docker_compose_wordpress_path: "{{path_docker_compose_files}}wordpress/"
|
||||
wordpress_max_upload_size: "64M"
|
||||
|
@ -2,7 +2,7 @@
|
||||
- name: recreate yourls
|
||||
command:
|
||||
cmd: docker-compose -p yourls up -d --force-recreate
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{path_docker_compose_files}}yourls/"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
|
@ -8,14 +8,14 @@
|
||||
dest: "/etc/nginx/conf.d/{{domain}}.conf"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
- name: "create {{path_docker_compose_files}}yourls/"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
path: "{{path_docker_compose_files}}yourls/"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
dest: "{{path_docker_compose_files}}yourls/docker-compose.yml"
|
||||
notify: recreate yourls
|
||||
|
@ -1 +0,0 @@
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}yourls/"
|
Loading…
Reference in New Issue
Block a user