Compare commits

..
121 Commits
Author SHA1 Message Date
Mike Holloway 9b74a7b610 environment directive correction 2026-10-22 22:34:06 -04:00
Mike Holloway dc958431ae Watchtower socket path change 2026-10-22 22:23:59 -04:00
Mike Holloway e3eec4525e Firewall work 2026-10-20 21:36:11 -04:00
Mike Holloway abc87e72ff Caddyfile port as per https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md 2026-10-20 21:32:59 -04:00
Mike Holloway 0e0efd756e Caddyfile path 2026-10-20 02:07:20 -04:00
Mike Holloway 1e7245ce27 Enable Caddy on Boot 2026-10-20 02:04:10 -04:00
Mike Holloway 4da85c5167 File action cleanup 2026-10-20 02:00:29 -04:00
Mike Holloway 8edd81a25b package action fixing 2026-10-20 01:51:24 -04:00
Mike Holloway c50fab0ee9 package action fixing 2026-10-20 01:50:18 -04:00
Mike Holloway 1603a60fff caddy package, caddy file cleanup 2026-10-20 01:48:28 -04:00
Mike Holloway c1a4eeefe4 more ipv4 2026-10-20 01:30:18 -04:00
Mike Holloway 65308c2346 ipv4 caddy 2026-10-20 01:28:02 -04:00
Mike Holloway ba63b2a877 Caddy podman volumes 2026-10-20 01:21:30 -04:00
Mike Holloway 790d47314d Caddy file path fix 2026-10-20 01:19:47 -04:00
Mike Holloway 1ca809d77d Caddyfile typo fix 2026-10-20 00:48:34 -04:00
Mike Holloway b02d675541 Caddy 2026-10-20 00:46:32 -04:00
Mike Holloway 6bcb8389b0 podman compose volume name override 2026-10-20 00:22:31 -04:00
Mike Holloway 2ad3226416 container name 2026-10-20 00:16:30 -04:00
Mike Holloway e3cb54f408 socket path 2026-10-20 00:12:47 -04:00
Mike Holloway 005cc52994 podman volume 2026-10-20 00:10:26 -04:00
Mike Holloway 59c6e2cd86 files cleanup 2026-10-19 23:45:17 -04:00
Mike Holloway e0314daa62 Correcting path 2026-10-19 23:43:39 -04:00
Mike Holloway d1b68b3f18 Nextcloud aio minimal 2026-10-19 23:38:16 -04:00
Mike Holloway 5d984b63d9 Basic ReadMe 2025-12-09 21:40:49 -05:00
Mike Holloway 2c8417771d redis,cron - hostnames for resolution to resolve redis connection errors in data/nextcloud.log 2025-12-09 20:59:54 -05:00
Mike Holloway a92b993be6 app,db - default postgres user 2025-12-09 20:11:03 -05:00
Mike Holloway 812d8ff158 app,db - env variables for automated install 2025-12-09 19:06:41 -05:00
Mike Holloway 117f43dc41 db - add to podman network for name resolution 2025-12-09 18:55:46 -05:00
Mike Holloway 31665244ad Working curl response - web container 2025-12-09 18:26:24 -05:00
Mike Holloway 579302d310 Working curl response 2025-12-09 18:21:55 -05:00
Mike Holloway 0155c77319 podman-compose - db.env template, no force overwrite 2025-12-09 17:47:07 -05:00
Mike Holloway 17cb5dfa44 podman-compose - db.env template 2025-12-09 17:21:11 -05:00
Mike Holloway 71489a12b6 web - unsaved file. podman-compose - image key 2025-12-09 17:06:06 -05:00
Mike Holloway 6387bd8bff podman - network names, images 2025-12-09 17:01:01 -05:00
Mike Holloway 53dc2c99e3 proxy - user.name loop var 2025-12-09 16:54:22 -05:00
Mike Holloway 6c6c09421c proxy - web subdir 2025-12-09 16:44:45 -05:00
Mike Holloway c2b3fe960a Return to nextcloud repo example 2025-12-09 16:42:05 -05:00
Mike Holloway f5fce9b37e php - volume path 2025-12-09 03:46:37 -05:00
Mike Holloway b859e97294 nginx - server_name for 301 redirect 2025-12-09 02:45:41 -05:00
Mike Holloway 8cc4e49eb9 nginx - 80 and 443 inside container, to match docker-compose.yml 2025-12-08 23:45:05 -05:00
Mike Holloway a161b2d63e nginx - debug log level 2025-12-07 22:40:34 -05:00
Mike Holloway 884d325009 nginx - debug log level 2025-12-07 20:08:16 -05:00
Mike Holloway 911a6b5105 nginx - map directive in supplementary conf file along with invocation 2025-12-07 18:38:38 -05:00
Mike Holloway 4217f56c49 nginx - map directive troubleshooting 2025-12-07 18:28:00 -05:00
Mike Holloway 8060227475 nginx - Add asset_immutable var from nextcloud fpm example 2025-12-07 18:18:52 -05:00
Mike Holloway 39a5ca3f9a nginx - Dockerfile sed -i, semicolon line terminators 2025-12-07 18:13:32 -05:00
Mike Holloway c0af475117 nginx test 2025-12-07 18:03:30 -05:00
Mike Holloway 508c796abc nginx test 2025-12-07 18:01:07 -05:00
Mike Holloway b843fc68af nginx test 2025-12-07 17:55:06 -05:00
Mike Holloway bebfcca19f files.yml 2025-12-07 12:51:08 -05:00
Mike Holloway fee7347015 Without nginx-proxy 2025-12-07 12:48:37 -05:00
Mike Holloway e7d852842e proxy files work 2025-12-07 10:51:23 -05:00
Mike Holloway 5c78faa68f proxy files work 2025-12-07 02:34:23 -05:00
Mike Holloway 3791c6978c proxy files work 2025-12-07 02:31:30 -05:00
Mike Holloway 1d9f848b35 proxy files work 2025-12-07 02:26:46 -05:00
Mike Holloway 5ade913160 proxy files work 2025-12-07 02:22:13 -05:00
Mike Holloway 5828cdd570 proxy files work 2025-12-07 02:20:26 -05:00
Mike Holloway da62290e32 fastcgi proto 2025-12-07 02:12:28 -05:00
Mike Holloway 94db1a0f5b vhost file loop 2025-12-07 01:59:12 -05:00
Mike Holloway 29f35c9036 location and vhost option separation 2025-12-07 01:55:03 -05:00
Mike Holloway c97defb361 vhost location file test 2025-12-07 01:46:17 -05:00
Mike Holloway e0244d52d9 vhost file name 2025-12-07 01:40:44 -05:00
Mike Holloway f191a60515 env vars quotation work 2025-12-07 01:28:50 -05:00
Mike Holloway 2a2cff230e env vars move 2025-12-07 01:22:28 -05:00
Mike Holloway deb1578587 vhost options, files not templates 2025-12-07 01:17:19 -05:00
Mike Holloway 5ac39bbcc8 vhost options 2025-12-07 00:51:25 -05:00
Mike Holloway 19f6fdab58 weboot change 2025-12-07 00:44:35 -05:00
Mike Holloway 6deaf3640d network changes 2025-12-07 00:29:59 -05:00
Mike Holloway e120c272eb podman network removal 2025-12-07 00:27:06 -05:00
Mike Holloway 1408e87b0c Adding nginx-proxy, db services 2025-12-07 00:23:40 -05:00
Mike Holloway 7795ef9605 Adding nginx-proxy, db services 2025-12-07 00:21:22 -05:00
Mike Holloway ec1ec82518 example ineffective with rootless, reworking 2025-12-07 00:10:59 -05:00
Mike Holloway 159488d1c2 example ineffective with rootless, reworking 2025-12-06 23:46:35 -05:00
Mike Holloway b9c4c19aec example ineffective with rootless, reworking 2025-12-06 23:41:49 -05:00
Mike Holloway 0c2cf683ef resolver removed, ineffective 2025-12-06 23:12:59 -05:00
Mike Holloway 3d1706b213 network_mode removed, ineffective 2025-12-06 23:08:39 -05:00
Mike Holloway 22eb713d4d networks and network_mode service level conflict part II 2025-12-06 22:09:34 -05:00
Mike Holloway c30423da60 networks and network_mode service level conflict 2025-12-06 21:47:33 -05:00
Mike Holloway 41f6ade6c2 add slirp4netns network_mode option 2025-12-06 21:30:19 -05:00
Mike Holloway cb329d73ef update hostname field 2025-12-06 21:06:13 -05:00
Mike Holloway 90d93777d8 default network is podman 2025-12-06 20:59:22 -05:00
Mike Holloway 3d71b98a1b nginx parent dir 2025-12-06 20:33:31 -05:00
Mike Holloway 869d20a78f Folder loop 2025-12-06 20:04:48 -05:00
Mike Holloway 80b42a89b6 user name rather than uid 2025-12-06 20:00:58 -05:00
Mike Holloway 2bf1bb469e Adding self-signed cert volume mounts 2025-12-06 19:47:32 -05:00
Mike Holloway 0a9cc4d76e Handle proxy container files, syntax fixes 2025-12-06 19:32:37 -05:00
Mike Holloway ada1c82e83 Handle proxy container files, syntax fixes 2025-12-06 19:30:02 -05:00
Mike Holloway ab13981028 Handle proxy container files 2025-12-06 18:25:03 -05:00
Mike Holloway fc0088e877 Add default network 2025-12-06 18:16:00 -05:00
Mike Holloway d729f860c3 Removed item var from conf j2 template file 2025-12-06 16:53:54 -05:00
Mike Holloway b8ac9849b6 ansible complains of undefined item - replacing template task with file task, syntax fix 2025-12-06 16:36:16 -05:00
Mike Holloway 62ed03d090 ansible complains of undefined item - replacing template task with file task, syntax fix 2025-12-06 16:33:06 -05:00
Mike Holloway cbedfeeab9 ansible complains of undefined item - replacing template task with file task 2025-12-06 16:30:13 -05:00
Mike Holloway 00f6fe0256 ansible complains of undefined item - replacing file called test in tasks/files.yml 2025-12-06 16:24:41 -05:00
Mike Holloway e3b29e100b ansible complains of undefined item - troubleshooting with empty file called test 2025-12-06 15:56:12 -05:00
Mike Holloway a77aa43613 ansible complains of undefined item - troubleshooting with empty file called test 2025-12-06 15:45:43 -05:00
Mike Holloway 0847131b66 ansible complains of undefined item - troubleshooting 2025-12-06 15:21:11 -05:00
Mike Holloway 21e1a4c4e4 ansible complains of undefined item - troubleshooting 2025-12-06 14:51:04 -05:00
Mike Holloway 63cbfd0bf7 Full reset of podman assets - rootless mods and env specific var values 2025-12-06 14:39:24 -05:00
Mike Holloway 2048b9aaea Full reset of podman assets - base example config from nextcloud fpm nginx proxy example 2025-12-06 12:02:05 -05:00
Mike Holloway 10bb24bbf6 nginx conf adjustments - virtual host necessity 2025-12-06 11:51:07 -05:00
Mike Holloway 981b6f2bcb web dir 2025-12-04 21:28:44 -05:00
Mike Holloway 12f564b694 web/nginx.conf placement, template 2025-12-04 20:44:39 -05:00
Mike Holloway 18ff83bef1 path fix 2025-12-04 20:21:03 -05:00
Mike Holloway e1b63a42ed web/nginx.conf placement 2025-12-04 20:16:34 -05:00
Mike Holloway f3fd68ef56 Env vars adjustment, hostname adjustment, env file adjustment 2025-12-04 19:26:40 -05:00
Mike Holloway 3fbf61f504 Add default network explicitly 2025-12-04 19:21:50 -05:00
Mike Holloway f343b26fe9 Using postgres fpm example from official git repo 2025-12-04 19:13:49 -05:00
Mike Holloway 7480b2e244 postgres env vars work 2025-12-03 23:22:08 -05:00
Mike Holloway 02a359709c postgres env vars work 2025-12-03 23:17:30 -05:00
Mike Holloway cea092ee6a static db name 2025-12-03 23:09:40 -05:00
Mike Holloway 1586beb003 testing variable concat for db name 2025-12-03 23:03:59 -05:00
Mike Holloway 4850b8e662 webserver env 2025-12-03 22:53:59 -05:00
Mike Holloway 55648892eb hostnames added 2025-12-03 22:46:28 -05:00
Mike Holloway b1324501b2 fastcgi_index parameter for nginx vhost.d conf 2025-12-03 22:25:44 -05:00
Mike Holloway 5a9a79ebf1 .db.env file 2025-12-03 22:18:10 -05:00
Mike Holloway 39f642775e vhosts.d 2025-12-03 21:58:18 -05:00
Mike Holloway dbd76e6059 template file 2025-12-03 21:55:22 -05:00
Mike Holloway 4d4793a8ca vhost path using inventory_hostname 2025-12-03 20:30:37 -05:00
Mike Holloway 928418fa63 nginx-proxy index paramter - use ansible template and variable for dest parameter 2025-12-03 20:29:32 -05:00
Mike Holloway ed85221e34 nginx-proxy index parameter via vhosts file 2025-12-03 20:24:34 -05:00
11 changed files with 115 additions and 122 deletions

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
Role Name
=========
Produce a ready-to-configure nextcloud instance on the target system.
Requirements
------------
2025-12-09
- Rocky, AlmaLinux, or other RHEL-derived Linux system installation
- One internet-facing ethernet interface
Role Variables
--------------
host_vars:
certificates: 'self' || 'certbot'
service_users:
- name: nextcloud
services:
- "nextcloud"
Dependencies
------------
equilibrateit.podman_host
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD-Clause-2
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
+4
View File
@@ -0,0 +1,4 @@
FROM nginx:latest
RUN sed -i 's/\#gzip.*on;/server_tokens\toff;\n #gzip\ton;/' /etc/nginx/nginx.conf && \
sed -i 's/^error_log.*;/error_log\t\/var\/log\/nginx\/error.log debug;/' /etc/nginx/nginx.conf
+1 -1
View File
@@ -1,6 +1,6 @@
- name: Check for certs
file:
path: "/home/nextcloud/nginx/certs/{{ item }}"
path: "/home/{{ user.name }}/proxy/certs/{{ item }}"
state: file
loop:
- "{{ inventory_hostname }}.key"
+8 -8
View File
@@ -1,14 +1,14 @@
- name: Create certbot certs
copy:
remote_src: true
src: "/etc/letsencrypt/live/nextcloud.equilibrateit.test/privkey.pem"
dest: "/home/nextcloud/nginx/certs/{{ inventory_hostname }}.key"
owner: 100999
group: 100999
src: "/etc/letsencrypt/live/{{ inventory_hostname }}/privkey.pem"
dest: "/home/{{ user.name }}/proxy/certs/{{ inventory_hostname }}.key"
owner: 100033
group: 100033
- copy:
remote_src: true
src: "/etc/letsencrypt/live/nextcloud.equilibrateit.test/fullchain.pem"
dest: "/home/nextcloud/nginx/certs/{{ inventory_hostname }}.crt"
owner: 100999
group: 100999
src: "/etc/letsencrypt/live/{{ inventory_hostname }}/fullchain.pem"
dest: "/home/{{ user.name }}/proxy/certs/{{ inventory_hostname }}.crt"
owner: 100033
group: 100033
+2 -24
View File
@@ -1,9 +1,8 @@
- name: Create self-signed certs
become: yes
become_user: nextcloud
command:
chdir: /home/nextcloud/
creates: "/home/nextcloud/{{ inventory_hostname }}.key"
chdir: /root/
creates: "/root/{{ inventory_hostname }}.key"
argv:
- openssl
- req
@@ -37,24 +36,3 @@
# - "{{ inventory_hostname}}.normal.crt"
# - -out
# - "{{ inventory_hostname}}.crt"
- copy:
src: "/home/nextcloud/{{ inventory_hostname }}.crt"
remote_src: true
dest: /home/nextcloud/nginx/certs/
owner: 100999
- copy:
src: "/home/nextcloud/{{ inventory_hostname }}.key"
remote_src: true
dest: /home/nextcloud/nginx/certs/
owner: 100999
- file:
path: "/home/nextcloud/{{ item }}"
state: absent
with_items:
- "{{ inventory_hostname }}.normal.crt"
- "{{ inventory_hostname }}.crt"
#- "{{ inventory_hostname }}.key"
+15 -30
View File
@@ -1,34 +1,19 @@
- name: Container Path data State directory
file:
path: "/home/{{ user.name }}/webroot"
state: directory
owner: "100999"
group: "100999"
- name: Container Path certs State directory
file:
path: "/home/{{ user.name }}/nginx/certs"
state: directory
owner: "100999"
group: "100999"
- name: Container Path html State directory
file:
path: "/home/{{ user.name }}/nginx/html"
state: directory
owner: "100999"
group: "100999"
- name: Cointainer Path challenges directory
file:
path: "/home/{{ user.name }}/nginx/challenges"
- name: Create Nextcloud Compose File
template:
src: "app/docker-compose.yml.j2"
dest: "/home/{{ user.name }}/nextcloud/docker-compose.yml"
owner: "{{ user.name }}"
group: "{{ user.name }}"
state: directory
owner: "100999"
group: "100999"
- name: Create Compose File
- name: Create proxy Directory
file:
state: directory
path: "/root/proxy"
- name: Create Caddyfile
template:
src: "docker-compose.yml.j2"
dest: "/home/{{ user.name }}/docker-compose.yml"
src: "proxy/Caddyfile"
dest: "/etc/caddy/Caddyfile"
owner: "{{ user.name }}"
group: "{{ user.name }}"
+5 -13
View File
@@ -1,23 +1,15 @@
- name: Root port openings and forwards for web traffic.
firewalld:
port: "80/tcp"
port: "{{ port }}"
zone: public
permanent: true
immediate: true
state: enabled
with_items:
- "80"
- "443"
- firewalld:
rich_rule: "{{ item }}"
zone: public
permanent: true
immediate: true
state: enabled
with_items:
- "rule family=ipv4 forward-port port=80 protocol=tcp to-port=8080"
- "rule family=ipv4 forward-port port=443 protocol=tcp to-port=4443"
- "80/tcp"
- "443/tcp"
loop_control:
loop_var: port
- command:
cmd: "firewall-cmd --reload"
+10
View File
@@ -6,6 +6,16 @@
getent:
database: passwd
- name: Install Caddy
dnf:
name: caddy
state: present
- name: Start Caddy on Boot
systemd_service:
name: caddy
state: started
enabled: true
- block:
- include_tasks: certificates.yml
with_items:
+21
View File
@@ -0,0 +1,21 @@
services:
# Example app to proxy to
nextcloud-aio:
image: ghcr.io/nextcloud-releases/all-in-one:latest
container_name: nextcloud-aio-mastercontainer
restart: always
ports:
- 0.0.0.0:8080:8080
- 0.0.0.0:8443:8443
- 0.0.0.0:9000:9000
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /run/user/{{ getent_passwd[user.name][2] }}/podman/podman.sock:/var/run/docker.sock:ro
environment:
- NEXTCLOUD_DATADIR=/home/{{ user.name }}/
- APACHE_PORT=4443
- WATCHTOWER_DOCKER_SOCKET_PATH=/run/user/{{ getent_passwd[user.name][2] }}/podman/podman.sock
# Note: No need to expose ports to the host; Caddy talks to it via the internal docker network.
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
-46
View File
@@ -1,46 +0,0 @@
version: '3.6'
services:
nextcloud:
image: nextcloud:stable-fpm
restart: always
ports:
- 9000:9000
environment:
VIRTUAL_PROTO: "fastcgi"
VIRTUAL_HOST: "{{ inventory_hostname | default('ansible_undefined_fact') }}"
VIRTUAL_ROOT: "/var/www/html/"
LETSENCRYPT_HOST: "{{ inventory_hostname | default('ansible_undefined_fact') }}"
POSTGRES_DB: "nextclouddb"
POSTGRES_USER: "nextcloud"
POSTGRES_HOST: "database"
NEXTCLOUD_TRUSTED_DOMAINS: "{{ inventory_hostname | default('ansible_undefined_fact') }}"
networks:
default:
aliases:
- "test-eqit.lan"
volumes:
- ~/webroot:/var/www/html
database:
image: postgres:latest
restart: always
networks:
default:
aliases:
"nextcloud-db.lan"
nginx-proxy:
restart: unless-stopped
ports:
- 8080:8080
- 4443:4443
image: nginxproxy/nginx-proxy:1.9-alpine
environment:
HTTP_PORT: 8080
HTTPS_PORT: 4443
volumes:
- /run/user/1000/podman/podman.sock:/tmp/docker.sock:ro
- /home/nextcloud/nginx/certs:/etc/nginx/certs
- /home/nextcloud/nginx/challenges:/usr/share/nginx/html
+4
View File
@@ -0,0 +1,4 @@
{{ inventory_hostname }} {
# Reverse proxy to the container name and its internal port
reverse_proxy 127.0.0.1:11000
}