believethehype / nostdress

Lightning addresses server based on satdress. Adapted to work with Nostr features (NIP05, NIP57)
MIT License
47 stars 14 forks source link

Docker build without losing the database #11

Closed Chuck3CZ closed 1 year ago

Chuck3CZ commented 1 year ago

Hi, nice job there,

I tried to make translation, add .html and rebuild docker, but database dissapear and .well-known adr. as well...

Any hint how to rebuild without losing database? Which command to use?

Chuck3CZ commented 1 year ago
Snímek obrazovky 2023-04-21 v 11 29 15
believethehype commented 1 year ago

Hey, please make sure to set the DB_DIR flag to a folder that the docker can access. Will provide an example soon!

fishcakeday commented 1 year ago

Here is the example of a docker-compose.yml that I will submit PR for

version: "3.7"

services:
  satdress:
    build: .
    restart: always
    container_name: nostdress
    environment:
      - PORT=17422
      - DOMAIN=example.com,example.net,example.org
      - GLOBAL_USERS=false
      - DB_DIR=/data
      - SECRET=<secret string>
      - SITE_OWNER_URL=<site url>
      - SITE_OWNER_NAME=<your name>
      - SITE_NAME=<your domain>
      - TOR_PROXY_URL=“”
      - NOSTR_PRIVATE_KEY=<nsec…>
      - GET_NOSTR_PROFILE=false
      - RELAYS="wss://nostr.mutinywallet.com,wss://relay.nostrgraph.net,wss://blastr.f7z.xyz,wss://relay.damus.io/,wss://relay.utxo.one,wss://relay.nostr.ch,wss://eden.nostr.land,wss://nostr.btcmp.com,wss://nostr.relayer.se,wss://relay.current.fyi,wss://nos.lol,wss://nostr.mom,wss://relay.nostr.info,wss://nostr.zebedee.cloud,wss://nostr-pub.wellorder.net,wss://relay.snort.social/,wss://nostr.oxtr.dev/,wss://nostr.fmt.wiz.biz/,wss://brb.io"
    ports:
      - 17422:17422
    volumes:
      - ./data:/data
#   links:
#     - tor:tor-proxy
# tor:
#   image: getumbrel/tor:latest
#   user: "1000:1000"
#   restart: on-failure
#   volumes:
#     - ./torrc:/etc/tor/torrc:ro
#     - ./data:/data
#   ports:
#     - "9059:9050"
#   environment:
#     HOME: "/tmp"
volumes:
  satdress-data:
    name: satdress-data
fishcakeday commented 1 year ago

13 should have the necessary changes, please test.

fishcakeday commented 1 year ago

Also #15 has minor copy/paste artifacts fixes.

Chuck3CZ commented 1 year ago

Awesome, everything works, /data with domain-multiple.db directly in nostdress ❤️ Thanks