diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..2cdac4a --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,25 @@ +name: Deploy Monorepo to Opt +on: [push] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Sync OVH Subfolder to Opt + run: | + # Create the target path on the host + mkdir -p /opt/hurricane/apps/ovh + + # Copy only the contents of the 'ovh' folder from the repo + # This avoids copying the top-level .git, ansible, or cloudflare folders + cp -r ./ovh/. /opt/hurricane/apps/ovh/ + + - name: Launch Independent Stacks + run: | + cd /opt/hurricane/apps/ovh/ + # Deploying as independent projects + docker compose -p nextcloud -f nextcloud.yml up -d --remove-orphans + docker compose -p plex -f plex.yml up -d --remove-orphans \ No newline at end of file diff --git a/ovh/compose.yml b/ovh/compose.yml deleted file mode 100644 index 3ea1077..0000000 --- a/ovh/compose.yml +++ /dev/null @@ -1,49 +0,0 @@ -services: - nginx-proxy-manager: - image: 'jc21/nginx-proxy-manager:latest' - container_name: npm - restart: always - ports: - - '80:80' # HTTP - - '443:443' # HTTPS - - '81:81' # Admin Web Portal - volumes: - - ./npm/data:/data - - ./npm/letsencrypt:/etc/letsencrypt - networks: - - hurricane - gitea: - image: gitea/gitea:latest - container_name: gitea - restart: always - environment: - - USER_UID=1000 - - USER_GID=1000 - - GITEA__database__DB_TYPE=sqlite3 - # Email Settings - - GITEA__mailer__ENABLED=true - - GITEA__mailer__PROTOCOL=smtp - - GITEA__mailer__SMTP_ADDR=taylor.mxrouting.net - - GITEA__mailer__SMTP_PORT=587 - - GITEA__mailer__USER=z@h-y.st - - GITEA__service__DISABLE_REGISTRATION=true - - GITEA__mailer__PASSWD=Shan33779488@@ - - GITEA__mailer__FROM=z@h-y.st - # Updated Domain & SSH Settings - - GITEA__server__DOMAIN=g.h-y.st - - GITEA__server__SSH_DOMAIN=g.h-y.st - - GITEA__server__ROOT_URL=https://g.h-y.st/ - - GITEA__server__SSH_PORT=22 - - GITEA__server__LFS_START_SERVER=true - networks: - - hurricane - ports: - - "22:22" # Mapping Host Port 22 to Container Port 22 - volumes: - - ./giteadata:/data - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - -networks: - hurricane: - external: true diff --git a/ovh/nextcloud.yml b/ovh/nextcloud.yml new file mode 100644 index 0000000..1f53fac --- /dev/null +++ b/ovh/nextcloud.yml @@ -0,0 +1,53 @@ +services: + db: + image: mariadb:11.8-noble + container_name: nc-db + restart: always + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-use-native-aio=0 + volumes: + - ./mariadb:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=Shan33779488 + - MYSQL_PASSWORD=Shan33779488 + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + networks: + - hurricane + + redis: + image: redis:latest + container_name: nc-redis + restart: always + networks: + - hurricane + + app: + image: nextcloud:latest + container_name: nc-app + restart: always + depends_on: + - db + - redis + ports: + - "8080:80" + environment: + - MYSQL_PASSWORD=Shan33779488 + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + - MYSQL_HOST=nc-db + - REDIS_HOST=nc-redis + - APACHE_DISABLE_REWRITE_IP=1 + - TRUSTED_PROXIES=172.16.0.0/12 192.168.0.0/16 10.0.0.0/8 + - OVERWRITEHOST=uk.azuredevops.co.uk + - OVERWRITEPROTOCOL=https + - OVERWRITECLIURL=https://uk.azuredevops.co.uk + - PHP_MEMORY_LIMIT=2G + volumes: + - ./nc_data/www:/var/www/html + - ./data/files:/var/www/html/data + networks: + - hurricane + +networks: + hurricane: + external: true diff --git a/ovh/plex.yml b/ovh/plex.yml new file mode 100644 index 0000000..1d151a7 --- /dev/null +++ b/ovh/plex.yml @@ -0,0 +1,16 @@ +services: + plex: + image: lscr.io/linuxserver/plex:latest + container_name: plex + network_mode: host # Host mode is best for Plex (DLNA/Discovery) + environment: + - PUID=1000 + - PGID=1000 + - VERSION=docker + - PLEX_CLAIM= "claim-ij8rxsGrpyj41pJ6uTYF" + volumes: + - /opt/docker/plex/config:/config + - /mnt/data/media:/data/media + devices: + - /dev/dri:/dev/dri # Hardware acceleration (Intel/AMD) + restart: unless-stopped