update frpc

This commit is contained in:
YuanHui
2025-12-12 14:00:45 +08:00
parent 5a13b959a1
commit 7b6d415c87
2 changed files with 53 additions and 0 deletions

44
deploy_frpc.yml Normal file
View File

@@ -0,0 +1,44 @@
---
- name: Deploy and Restart frpc service on Alpine Linux
hosts: 192.168.31.101
become: yes
tasks:
- name: Create frpc directory
file:
path: /root/frpc
state: directory
owner: root
group: root
mode: '0755'
- name: Create frpc data directory
file:
path: /root/frpc/data
state: directory
owner: root
group: root
mode: '0755'
- name: Copy frpc.toml configuration file
copy:
src: "files/{{ inventory_hostname }}/frp/frpc.toml"
dest: /root/frpc/data/frpc.toml
owner: root
group: root
mode: '0644'
- name: Copy docker-compose.yml file
copy:
src: "files/{{ inventory_hostname }}/frp/docker-compose.yml"
dest: /root/frpc/docker-compose.yml
owner: root
group: root
mode: '0644'
notify: Restart frpc service
handlers:
- name: Restart frpc service
command: docker compose up -d
args:
chdir: /root/frpc

View File

@@ -0,0 +1,9 @@
services:
frpc:
container_name: frpc
image: snowdreamtech/frpc
network_mode: host
restart: unless-stopped
volumes:
- ./data/frpc.toml:/etc/frp/frpc.toml
- ./data/ssl:/etc/frp/ssl