This commit is contained in:
@@ -1,28 +1,33 @@
|
|||||||
name: Deploy ru-vps
|
name: Deploy ru-vps
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
stack:
|
stack:
|
||||||
description: "Stack to deploy (leave empty to reconcile all)"
|
description: "Stack to deploy (leave empty to reconcile all)"
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- ".gitea/workflows/deploy-ru-vps.yml"
|
- ".gitea/workflows/deploy-ru-vps.yml"
|
||||||
- "ru-vps/**"
|
- "ru-vps/**"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 4 * * *"
|
- cron: "0 4 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ru-vps
|
runs-on: ru-vps
|
||||||
steps:
|
steps:
|
||||||
- name: Sync repo
|
- name: Sync repo
|
||||||
run: |
|
run: |
|
||||||
git config --global --replace-all safe.directory /opt/services
|
git config --global --replace-all safe.directory /opt/services
|
||||||
git -C /opt/services pull origin main --ff-only
|
git -C /opt/services pull origin main --ff-only
|
||||||
chown -R 1000:100 /opt/services
|
chown -R 1000:100 /opt/services
|
||||||
|
|
||||||
- name: Deploy stacks
|
- name: Write squid secrets
|
||||||
run: /opt/services/scripts/deploy.sh ru-vps "${{ inputs.stack }}"
|
run: |
|
||||||
|
echo "PROXY_USER=${{ secrets.PROXY_USER }}" > /opt/services/ru-vps/squid/.env
|
||||||
|
echo "PROXY_PASS=${{ secrets.PROXY_PASS }}" >> /opt/services/ru-vps/squid/.env
|
||||||
|
|
||||||
|
- name: Deploy stacks
|
||||||
|
run: /opt/services/scripts/deploy.sh ru-vps "${{ inputs.stack }}"
|
||||||
|
|||||||
@@ -6,3 +6,14 @@ services:
|
|||||||
- ./squid.conf:/etc/squid/squid.conf:ro
|
- ./squid.conf:/etc/squid/squid.conf:ro
|
||||||
- ./passwd:/etc/squid/passwd:ro
|
- ./passwd:/etc/squid/passwd:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
3proxy:
|
||||||
|
image: 3proxy/3proxy
|
||||||
|
network_mode: host
|
||||||
|
environment:
|
||||||
|
- PROXY_USER=${PROXY_USER}
|
||||||
|
- PROXY_PASS=${PROXY_PASS}
|
||||||
|
volumes:
|
||||||
|
- ./entrypoint.sh:/entrypoint.sh:ro
|
||||||
|
entrypoint: sh /entrypoint.sh
|
||||||
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cat > /tmp/3proxy.cfg << EOF
|
||||||
|
daemon
|
||||||
|
log /dev/stdout
|
||||||
|
auth strong
|
||||||
|
users ${PROXY_USER}:CL:${PROXY_PASS}
|
||||||
|
allow ${PROXY_USER}
|
||||||
|
socks -p1080
|
||||||
|
EOF
|
||||||
|
exec 3proxy /tmp/3proxy.cfg
|
||||||
Reference in New Issue
Block a user