added deployment for external apps
This commit is contained in:
97
deploy/ansible-playbook.yml
Normal file
97
deploy/ansible-playbook.yml
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
---
|
||||||
|
- hosts: internal-apps
|
||||||
|
become: true
|
||||||
|
vars_files:
|
||||||
|
- ./vars.yml
|
||||||
|
tasks:
|
||||||
|
- name: Update Packages
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Install Packages
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name:
|
||||||
|
- vim
|
||||||
|
- podman
|
||||||
|
- fail2ban
|
||||||
|
- python3-libdnf5
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Create directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
loop: "{{ directories }}"
|
||||||
|
|
||||||
|
- name: Create internal podman network
|
||||||
|
containers.podman.podman_network:
|
||||||
|
name: npm_internal
|
||||||
|
ip_range: 10.10.0.128/25
|
||||||
|
subnet: 10.10.0.0/24
|
||||||
|
gateway: 10.10.0.1
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: pull images
|
||||||
|
containers.podman.podman_image:
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop: "{{ images }}"
|
||||||
|
|
||||||
|
### NGINX Proxy manager --------------------------##
|
||||||
|
- name: Deploy Nginx Proxy Manager
|
||||||
|
containers.podman.podman_container:
|
||||||
|
image: "docker.io/jc21/nginx-proxy-manager:latest"
|
||||||
|
name: npm
|
||||||
|
restart_policy: always
|
||||||
|
recreate: true
|
||||||
|
state: started
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "81:81"
|
||||||
|
- "443:443"
|
||||||
|
volumes:
|
||||||
|
- "/opt/apps/npm:/data:z"
|
||||||
|
- "/opt/apps/letsencrypt:/etc/letsencrypt:z"
|
||||||
|
network:
|
||||||
|
- npm_internal
|
||||||
|
ip: '10.10.0.19'
|
||||||
|
|
||||||
|
### Deploy Gitea ---------------------------------##
|
||||||
|
- name: Deploy Gitea
|
||||||
|
containers.podman.podman_container:
|
||||||
|
image: docker.gitea.com/gitea:nightly
|
||||||
|
name: gitea
|
||||||
|
env:
|
||||||
|
USER_UID: 1000
|
||||||
|
USER_GID: 1000
|
||||||
|
restart_policy: always
|
||||||
|
recreate: true
|
||||||
|
state: started
|
||||||
|
volumes:
|
||||||
|
- /opt/apps/gitea:/data:z
|
||||||
|
- /usr/share/zoneinfo/America/Denver:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
network:
|
||||||
|
- npm_internal
|
||||||
|
ip: '10.10.0.25'
|
||||||
|
ports:
|
||||||
|
# - "3000:3000"
|
||||||
|
- "222:22"
|
||||||
|
|
||||||
|
|
||||||
|
###---- Deploy Matrix Synapse ------------------#
|
||||||
|
- name: Deploy Matrix Synapse
|
||||||
|
containers.podman.podman_container:
|
||||||
|
image: docker.io/matrixdotorg/synapse:latest
|
||||||
|
name: synapse
|
||||||
|
volumes:
|
||||||
|
- /opt/apps/synapse/data:/data:z
|
||||||
|
command: run -m synapse.app.generic_worker --config-path=/data/homeserver.yaml --config-path=/data/generic_worker.yaml
|
||||||
|
network:
|
||||||
|
- npm_internal
|
||||||
|
ip: '10.10.0.35'
|
||||||
|
# ports:
|
||||||
|
# - 8008:8008
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2
deploy/inentory.ini
Normal file
2
deploy/inentory.ini
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[internal-apps]
|
||||||
|
internal-apps
|
||||||
2
deploy/requirements.yml
Normal file
2
deploy/requirements.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
collections:
|
||||||
|
- name: containers.podman
|
||||||
23
deploy/vars.yml
Normal file
23
deploy/vars.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## add generic 755 directory for application here
|
||||||
|
directories:
|
||||||
|
- /opt/apps/npm
|
||||||
|
- /opt/apps/letsencrypt
|
||||||
|
- /opt/apps/gitea
|
||||||
|
- /opt/apps/prowler/data
|
||||||
|
- /opt/apps/prowler/tmp/prowler_api_output
|
||||||
|
- /opt/apps/prowler/postgres/data
|
||||||
|
- /opt/apps/synapse/data
|
||||||
|
# - /opt/apps/n8n/files
|
||||||
|
|
||||||
|
|
||||||
|
images:
|
||||||
|
- docker.io/jc21/nginx-proxy-manager:latest
|
||||||
|
- docker.gitea.com/gitea:nightly
|
||||||
|
- docker.io/matrixdotorg/synapse:latest
|
||||||
|
|
||||||
|
sudo_password: sdfwwww
|
||||||
|
|
||||||
|
POSTGRES_ADMIN_USER: theuseriwant
|
||||||
|
POSTGRES_PASSWORD: theuserthatineedpaswoord
|
||||||
|
POSTGRES_DB: thatoneit
|
||||||
|
|
||||||
Reference in New Issue
Block a user