From 574f7094e63baa3211d60f13cca3dbbee79d41c9 Mon Sep 17 00:00:00 2001 From: ngutech21 Date: Fri, 15 Dec 2023 13:51:53 +0100 Subject: [PATCH] fix: use new token in github action --- .fly | 13 ++++++++++ .github/workflows/docker.yml | 2 +- docker-compose.yml | 14 ++++++++++- fly.toml | 49 +++++++++++++++++++----------------- rust-toolchain.toml | 3 +++ 5 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 .fly create mode 100644 rust-toolchain.toml diff --git a/.fly b/.fly new file mode 100644 index 00000000..b0162f0e --- /dev/null +++ b/.fly @@ -0,0 +1,13 @@ +Now that you've set up Postgres, here's what you need to understand: https://fly.io/docs/postgres/getting-started/what-you-should-know/ +Checking for existing attachments +Registering attachment +Creating database +Creating user + +Postgres cluster moksha-mint-db is now attached to moksha-mint +The following secret was added to moksha-mint: +DATABASE_URL=postgres://moksha_mint:Vj8Kq3aUC03PvPz@moksha-mint-db.flycast:5432/moksha_mint?sslmode=disable +Postgres cluster moksha-mint-db is now attached to moksha-mint +Wrote config file fly.toml +Validating /Users/steffen/projects/moksha/fly.toml +Platform: machines diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 727bf5ea..a6dbd9b8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,7 +16,7 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GHCR_RW }} - name: Build and push Docker image uses: docker/build-push-action@v5 diff --git a/docker-compose.yml b/docker-compose.yml index 8684afe7..782d5826 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,10 +10,22 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_DB: moksha-mint app: - image: "registry.fly.io/moksha-mint" + image: "registry.fly.io/moksha-mint@sha256:de70a65f43e1417b47c988b20de0f65aa0e7247ed0934651b1e5e86cacdbd494" ports: - 3338:3338 + volumes: + - /Users/steffen/projects/moksha/data/mutinynet/admin.macaroon:/app/admin.macaroon + - /Users/steffen/projects/moksha/data/mutinynet/tls.cert:/app/tls.cert environment: - DATABASE_URL=postgres://postgres:postgres@database/moksha-mint + - MINT_APP_ENV=prod + - MINT_LIGHTNING_BACKEND=Lnd + - LND_MACAROON_PATH=/app/admin.macaroon + - LND_TLS_CERT_PATH=/app/tls.cert + - LND_GRPC_HOST=https://mutinynet.moksha.cash:10009 + - MINT_PRIVATE_KEY=ajszwuelakszetdh + - MINT_DB_URL=postgres://postgres:postgres@database/moksha-mint + - LIGHTNING_FEE_PERCENT=0.01 + - LIGHTNING_RESERVE_FEE_MIN=10 profiles: - app diff --git a/fly.toml b/fly.toml index 1208503d..d7f5f4fc 100644 --- a/fly.toml +++ b/fly.toml @@ -1,4 +1,4 @@ -# fly.toml app configuration file generated for moksha-mint on 2023-12-13T20:00:51+01:00 +# fly.toml app configuration file generated for moksha-mint on 2023-12-14T15:52:30+01:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # @@ -6,7 +6,22 @@ app = "moksha-mint" primary_region = "ams" -[build] +[env] +LIGHTNING_FEE_PERCENT = "0" +LIGHTNING_RESERVE_FEE_MIN = "0" +LND_GRPC_HOST = "https://mutinynet.moksha.cash:10009" +LND_MACAROON_PATH = "/admin.macaroon" +LND_TLS_CERT_PATH = "/tls.cert" +MINT_DB_URL = "postgres://moksha_mint:Vj8Kq3aUC03PvPz@moksha-mint-db.flycast:5432/moksha_mint?sslmode=disable" +MINT_HOST_PORT = "[::]:3338" +MINT_INFO_DESCRIPTION = "fly.io mint" +MINT_INFO_DESCRIPTION_LONG = "mint description long" +MINT_INFO_MOTD = "some message of the day" +MINT_INFO_NAME = "moksha-mint" +MINT_INFO_VERSION = "true" +MINT_LIGHTNING_BACKEND = "Lnd" +MINT_PRIVATE_KEY = "changeme" +SQLX_OFFLINE = "false" [http_service] internal_port = 3338 @@ -16,31 +31,19 @@ auto_start_machines = true min_machines_running = 0 processes = ["app"] -[[vm]] -cpu_kind = "shared" -cpus = 1 -memory_mb = 1024 - -[env] -MINT_APP_ENV = "prod" -SQLX_OFFLINE = "false" -MINT_HOST_PORT = "[::]:3338" -MINT_INFO_NAME = "moksha-mint" -MINT_INFO_VERSION = "true" -MINT_INFO_DESCRIPTION = "fly.io mint" -MINT_INFO_DESCRIPTION_LONG = "mint description long" -MINT_INFO_MOTD = "some message of the day" -LIGHTNING_FEE_PERCENT = "0" -LIGHTNING_RESERVE_FEE_MIN = "0" -MINT_LIGHTNING_BACKEND = "Lnd" -LND_MACAROON_PATH = "/admin.macaroon" -LND_TLS_CERT_PATH = "/tls.cert" -LND_GRPC_HOST = "https://mutinynet.moksha.cash:10009" - [[files]] guest_path = "/admin.macaroon" +local_path = "" secret_name = "LND_MACAROON" +raw_value = "" [[files]] guest_path = "/tls.cert" +local_path = "" secret_name = "LND_TLS_CERT" +raw_value = "" + +[[vm]] +cpu_kind = "shared" +cpus = 1 +memory_mb = 1024 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..564a7013 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.74.1" +components = ["clippy", "rustfmt"]