Compare commits

...

2 commits

Author SHA1 Message Date
e006f44dd6
Add minio to ansible 2023-12-11 15:27:03 +01:00
5f9747c378
Remove hardly used compose shortscuts 2023-12-11 14:49:43 +01:00
17 changed files with 74 additions and 93 deletions

1
.gitignore vendored
View file

@ -13,6 +13,7 @@
/homebox/
/influxdb/
/jellyfin/
/minio/
/tandoor/
/telegraf/
/tinytinyrss/

View file

@ -15,27 +15,12 @@ compose_file_main:
apps:
external: true
compose_file_depends_on:
services:
app:
depends_on: "{{ compose.depends_on }}"
compose_file_env:
services:
app:
env_file:
- service.env
compose_file_user:
services:
app:
user: "{{ compose.user }}"
compose_file_ports:
services:
app:
ports: "{{ compose.ports }}"
compose_file_volumes:
services:
app:

View file

@ -1 +1,2 @@
services_path: /opt/services/
ansible_port: "{{ vault_node002.ansible_port }}"
ansible_user: "{{ vault_node002.ansible_user }}"

View file

@ -0,0 +1,2 @@
ansible_port: "{{ vault_node003.ansible_port }}"
ansible_user: "{{ vault_node003.ansible_user }}"

View file

@ -4,3 +4,5 @@ all:
ansible_connection: local
node002:
ansible_host: node002.serguzim.net
node003:
ansible_host: node003.serguzim.net

5
_ansible/node003.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: Run roles for node003
hosts: node003
roles:
- minio

View file

@ -16,8 +16,11 @@ svc:
compose:
watchtower: true
image: joohoi/acme-dns
ports:
- "53:53"
- "53:53/udp"
volumes:
- ./config:/etc/acme-dns:ro
file:
services:
app:
ports:
- "53:53"
- "53:53/udp"

View file

@ -85,10 +85,12 @@ compose:
- data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "{{ svc.ssh_port }}:{{ svc.ssh_port }}"
- "{{ svc.ssh_port_alt }}:{{ svc.ssh_port }}"
file:
services:
app:
ports:
- "{{ svc.ssh_port }}:{{ svc.ssh_port }}"
- "{{ svc.ssh_port_alt }}:{{ svc.ssh_port }}"
volumes:
data:

View file

@ -12,13 +12,15 @@ svc_env:
compose:
watchtower: true
image: jellyfin/jellyfin
user: 8096:8096
env: true
volumes:
- config:/config
- cache:/cache
- media:/media
file:
services:
app:
user: 8096:8096
volumes:
config:
cache:

View file

@ -0,0 +1,7 @@
---
- name: Deploy {{ svc.name }}
tags:
- minio
- storage
block:
- import_tasks: deploy-common-service.yml

View file

@ -0,0 +1,34 @@
svc:
domain: "s3.serguzim.me"
name: minio
port: 9000
caddy_extra: |
@nocache {
query nocache=*
}
header @nocache "Cache-Control" "no-store, no-cache"
extra_svcs:
- domain: console.s3.serguzim.me
docker_host: minio
port: 9001
svc_env:
MINIO_SERVER_URL: "https://{{ svc.domain }}/"
MINIO_BROWSER_REDIRECT_URL: "https://console.{{ svc.domain }}"
MINIO_VOLUMES: "/data"
MINIO_ROOT_USER: "{{ vault_minio.user }}"
MINIO_ROOT_PASSWORD: "{{ vault_minio.pass }}"
compose:
watchtower: true
image: minio/minio
env: true
volumes:
- data:/data
file:
services:
app:
command: server --console-address ":9001"
volumes:
data:

View file

@ -21,13 +21,14 @@ svc_env:
compose:
watchtower: false
image: cthulhoo/ttrss-web-nginx
depends_on:
- tt-rss
env: true
volumes:
- app:/var/www/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf
file:
app:
depends_on:
- tt-rss
services:
tt-rss:
image: cthulhoo/ttrss-fpm-pgsql-static

View file

@ -1,22 +1,10 @@
{%- set compose_file = compose.file | default({}) -%}
{%- set compose_file = compose_file_main | combine(compose_file, recursive=True) -%}
{%- if compose.depends_on | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_depends_on, recursive=True) -%}
{%- endif -%}
{%- if compose.env | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_env, recursive=True) -%}
{%- endif -%}
{%- if compose.ports | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_ports, recursive=True) -%}
{%- endif -%}
{%- if compose.user | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_user, recursive=True) -%}
{%- endif -%}
{%- if compose.volumes | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_volumes, recursive=True) -%}
{%- endif -%}

View file

@ -11,7 +11,7 @@ services:
depends_on:
- redis
networks:
local-net:
default:
apps:
aliases:
- authentik
@ -29,15 +29,15 @@ services:
depends_on:
- redis
networks:
local-net:
default:
redis:
image: redis:alpine
restart: unless-stopped
networks:
local-net:
default:
networks:
local-net:
default:
apps:
external: true

View file

@ -1,16 +0,0 @@
s3.serguzim.me {
import default
@nocache {
query nocache=*
}
header @nocache "Cache-Control" "no-store, no-cache"
#header "Cache-Control" "no-store, no-cache"
reverse_proxy minio:9000
}
console.s3.serguzim.me {
import default
reverse_proxy minio:9001
}

View file

@ -1,12 +0,0 @@
MINIO_SERVER_URL="https://s3.serguzim.me/"
MINIO_BROWSER_REDIRECT_URL="https://console.s3.serguzim.me"
MINIO_VOLUMES="/data"
MINIO_ROOT_USER=
MINIO_ROOT_PASSWORD=
#MINIO_IDENTITY_OPENID_CONFIG_URL="https://auth.serguzim.me/application/o/s3-serguzim-me/.well-known/openid-configuration"
#MINIO_IDENTITY_OPENID_CLIENT_ID=
#MINIO_IDENTITY_OPENID_CLIENT_SECRET=
#MINIO_IDENTITY_OPENID_CLAIM_NAME="policy"
#MINIO_IDENTITY_OPENID_REDIRECT_URI="https://console.s3.serguzim.me/oauth_callback"

View file

@ -1,24 +0,0 @@
version: '3'
services:
app:
image: minio/minio
restart: always
labels:
com.centurylinklabs.watchtower.enable: true
env_file:
- .env
- .secret.env
volumes:
- "data:/data"
command: server --console-address ":9001"
networks:
apps:
aliases:
- minio
volumes:
data:
networks:
apps:
external: true