Skip to content

Instantly share code, notes, and snippets.

@kaosf
Created February 10, 2023 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaosf/f18310730c8315804cfe979f11dab9ed to your computer and use it in GitHub Desktop.
Save kaosf/f18310730c8315804cfe979f11dab9ed to your computer and use it in GitHub Desktop.
Nginx on https-portal for NIP-05
version: '3.7'
services:
https-portal:
image: steveltn/https-portal:1
restart: always
environment:
CUSTOM_NGINX_KAOSFIELD_NET_CONFIG_BLOCK: |
location = /.well-known/nostr.json { add_header Access-Control-Allow-Origin * always; root /nostr; }
volumes:
- /some/where:/nostr:ro
# /some/where/.well-known/nostr.json exists on host.
# CUSTOM_NGINX_<UPPERCASE_AND_UNDERSCORED_DOMAIN_NAME>_CONFIG_BLOCK ref. https://github.com/SteveLTN/https-portal/tree/e6b74c4b7adb182f09e7e8be22398f5dd310d480#other-server-block-level-configurations
# template ref. https://github.com/SteveLTN/https-portal/blob/e6b74c4b7adb182f09e7e8be22398f5dd310d480/fs_overlay/var/lib/nginx-conf/default.ssl.conf.erb#L46-L48
# domain.env_format_name ref. https://github.com/SteveLTN/https-portal/blob/e6b74c4b7adb182f09e7e8be22398f5dd310d480/fs_overlay/opt/certs_manager/models/domain.rb#L80-L82