paulbsd-salt/states/ipfs/config.sls
2021-01-17 17:44:22 +01:00

42 lines
1.1 KiB
Plaintext

---
ipfs-set-storagemax:
cmd.run:
- name: /usr/local/sbin/ipfs config Datastore.StorageMax "20GB"
- runas: ipfs
- cwd: /var/lib/ipfs
- watch-in:
- service: ipfs-service
ipfs-set-headers-1:
cmd.run:
- name: ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
- runas: ipfs
- cwd: /var/lib/ipfs
- watch-in:
- service: ipfs-service
ipfs-set-headers-2:
cmd.run:
#- name: ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:8888", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
- name: ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
- runas: ipfs
- cwd: /var/lib/ipfs
- watch-in:
- service: ipfs-service
ipfs-set-api:
cmd.run:
- name: /usr/local/sbin/ipfs config Addresses.API "/ip4/0.0.0.0/tcp/5001"
- runas: ipfs
- cwd: /var/lib/ipfs
- watch-in:
- service: ipfs-service
ipfs-set-gateway:
cmd.run:
- name: /usr/local/sbin/ipfs config Addresses.Gateway "/ip4/0.0.0.0/tcp/8888"
- runas: ipfs
- cwd: /var/lib/ipfs
- watch-in:
- service: ipfs-service