First self-hosted release
This commit is contained in:
44
.github/workflows/deploy_addon.yml
vendored
44
.github/workflows/deploy_addon.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: Deploy Addon
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
paths:
|
||||
- 'addon/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Create Docker image
|
||||
run: |
|
||||
docker build -t torrentio-addon:latest ./addon/
|
||||
docker save torrentio-addon:latest > torrentio_addon_latest.tar
|
||||
|
||||
- name: Upload Docker image
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
source: torrentio_addon_latest.tar
|
||||
target: /tmp/docker
|
||||
overwrite: true
|
||||
|
||||
- name: Deploy Docker image
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
script: |
|
||||
docker load -i /tmp/docker/torrentio_addon_latest.tar
|
||||
docker stop torrentio-addon
|
||||
docker rm torrentio-addon
|
||||
docker run -p 80:7000 -d --name torrentio-addon --restart always -e MONGODB_URI=${{ secrets.MONGODB_URI }} -e DATABASE_URI=${{ secrets.DATABASE_URI }} -e PROXY_HOSTS=${{ secrets.PROXY_HOSTS }} -e PROXY_USERNAME=${{ secrets.PROXY_USERNAME }} -e PROXY_PASSWORD=${{ secrets.PROXY_PASSWORD }} -e METRICS_USER=${{ secrets.METRICS_USER }} -e METRICS_PASSWORD=${{ secrets.METRICS_PASSWORD }} torrentio-addon:latest
|
||||
docker image prune -f
|
||||
44
.github/workflows/deploy_catalogs.yml
vendored
44
.github/workflows/deploy_catalogs.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: Deploy Catalogs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
paths:
|
||||
- 'catalogs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Create Docker image
|
||||
run: |
|
||||
docker build -t torrentio-catalogs:latest . -f ./catalogs/Dockerfile
|
||||
docker save torrentio-catalogs:latest > torrentio_catalogs_latest.tar
|
||||
|
||||
- name: Upload Docker image
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SCRAPER_SSH_HOST }}
|
||||
username: ${{ secrets.SCRAPER_SSH_USERNAME }}
|
||||
port: ${{ secrets.SCRAPER_SSH_PORT }}
|
||||
key: ${{ secrets.SCRAPER_SSH_KEY }}
|
||||
source: torrentio_catalogs_latest.tar
|
||||
target: /tmp/docker
|
||||
overwrite: true
|
||||
|
||||
- name: Deploy Docker image
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SCRAPER_SSH_HOST }}
|
||||
username: ${{ secrets.SCRAPER_SSH_USERNAME }}
|
||||
port: ${{ secrets.SCRAPER_SSH_PORT }}
|
||||
key: ${{ secrets.SCRAPER_SSH_KEY }}
|
||||
script: |
|
||||
docker load -i /tmp/docker/torrentio_catalogs_latest.tar
|
||||
docker stop torrentio-catalogs
|
||||
docker rm torrentio-catalogs
|
||||
docker run -p 80:7000 -d --name torrentio-catalogs --restart always -e MONGODB_URI=${{ secrets.SCRAPER_MONGODB_URI }} -e DATABASE_URI=${{ secrets.DATABASE_URI }} torrentio-catalogs:latest
|
||||
docker image prune -f
|
||||
Reference in New Issue
Block a user