Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
update CA, fix indentation, opens /api/v0/dns
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshultz committed Jun 30, 2020
1 parent 6a55525 commit e6134e8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ envsubst '$SERVER_ENDPOINT' \

echo "CONTACT_EMAIL='[email protected]'" > /etc/resty-auto-ssl/letsencrypt/conf.d/dehydrated.conf

# If this CA isn't used, it will fail as v1 has been depreciated
echo "CA=\"https://acme-v02.api.letsencrypt.org/directory\"" > /etc/resty-auto-ssl/letsencrypt/conf.d/ca.sh

exec "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ http {
# Initial setup tasks.
init_by_lua_block {
auto_ssl = (require "resty.auto-ssl").new()
auto_ssl:set("ca", "https://acme-v01.api.letsencrypt.org/directory")
auto_ssl:set("ca", "https://acme-v02.api.letsencrypt.org/directory")

--- Allow all domains
auto_ssl:set("allow_domain", function(domain)
return true
return true
end)

auto_ssl:init()
Expand All @@ -45,9 +45,9 @@ http {
client_max_body_size 128k;

location / {
content_by_lua_block {
auto_ssl:hook_server()
}
content_by_lua_block {
auto_ssl:hook_server()
}
}
}

Expand All @@ -56,10 +56,10 @@ http {

# Access for LetsEncrypt
location /.well-known/acme-challenge/ {
auth_basic off;
content_by_lua_block {
auto_ssl:challenge_server()
}
auth_basic off;
content_by_lua_block {
auto_ssl:challenge_server()
}
}

# Force HTTPS
Expand All @@ -73,7 +73,7 @@ http {

# Dynamic handler for issuing or returning certs for SNI domains.
ssl_certificate_by_lua_block {
auto_ssl:ssl_certificate()
auto_ssl:ssl_certificate()
}

# Define a fallback certificate so nginx can start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ spec:
servicePort: 9999
- path: /api/v0/id
backend: *api_service
- path: /api/v0/dns
backend: *api_service
- path: /api/v0/object/links
backend: *api_service
- path: /api/v0/object/patch/add-link
Expand Down Expand Up @@ -119,6 +121,8 @@ spec:
backend: *api_service
- path: /api/v0/id
backend: *api_service
- path: /api/v0/dns
backend: *api_service
- path: /api/v0/pin/add
backend: *api_service
- path: /api/v0/object/links
Expand Down
2 changes: 2 additions & 0 deletions devops/kubernetes/charts/origin/templates/ipfs.ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ spec:
backend: &api_service
serviceName: {{ template "ipfs.fullname" . }}
servicePort: 5001
- path: /api/v0/dns
backend: *api_service
- path: /api/v0/object/links
backend: *api_service
- path: /api/v0/object/patch/add-link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
command: ["/usr/local/bin/start_ipfs", "daemon", "--migrate"]
env:
- name: IPFS_LOGGING
value: info
value: ERROR
ports:
- containerPort: 4001
name: swarm
Expand Down

0 comments on commit e6134e8

Please sign in to comment.