[variables]
gateway_domain = "${domain}"
api_domain = "${domain}"

[config]
env = []

[[config.domains]]
serviceName = "ipfs"
port = 8080
host = "${gateway_domain}"

[[config.domains]]
serviceName = "ipfs"
port = 5001
host = "${api_domain}"

[[config.mounts]]
filePath = "/container-init.d/001-configure-api.sh"
content = """
#!/bin/sh
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST", "GET"]'
"""
