Skip to content

Commit

Permalink
feat: use single btcpay store
Browse files Browse the repository at this point in the history
  • Loading branch information
Keeqler committed Sep 11, 2024
1 parent 1f8c1ed commit d1d0c76
Show file tree
Hide file tree
Showing 16 changed files with 2,902 additions and 10,124 deletions.
16 changes: 5 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,16 @@ STRIPE_PRIVACY_GUIDES_WEBHOOK_SECRET=""
STRIPE_GENERAL_SECRET_KEY=""
STRIPE_GENERAL_WEBHOOK_SECRET=""

BTCPAY_URL="http://localhost"
BTCPAY_API_KEY=""
BTCPAY_STORE_ID=""
BTCPAY_WEBHOOK_SECRET=""

KEYCLOAK_URL="http://localhost:8080"
KEYCLOAK_CLIENT_ID="app"
KEYCLOAK_CLIENT_SECRET=""
KEYCLOAK_REALM_NAME="magic"

BTCPAY_URL="http://localhost"
BTCPAY_API_KEY=""
BTCPAY_MONERO_STORE_ID=""
BTCPAY_MONERO_WEBHOOK_SECRET=""
BTCPAY_FIRO_STORE_ID=""
BTCPAY_FIRO_WEBHOOK_SECRET=""
BTCPAY_PRIVACY_GUIDES_STORE_ID=""
BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET=""
BTCPAY_GENERAL_STORE_ID=""
BTCPAY_GENERAL_WEBHOOK_SECRET=""

MONERO_APPLICATION_RECIPIENT=""
FIRO_APPLICATION_RECIPIENT=""
PRIVACY_GUIDES_APPLICATION_RECIPIENT=""
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- name: Deploy
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_IP }} << 'EOF'
export HISTFILE=/dev/null
cd campaign-site
git checkout v2
echo "Pulling changes..."
Expand All @@ -42,13 +43,7 @@ jobs:
KEYCLOAK_CLIENT_SECRET=${{ secrets.KEYCLOAK_CLIENT_SECRET }} \
BTCPAY_URL=${{ secrets.BTCPAY_URL }} \
BTCPAY_API_KEY=${{ secrets.BTCPAY_API_KEY }} \
BTCPAY_MONERO_STORE_ID=${{ secrets.BTCPAY_MONERO_STORE_ID }} \
BTCPAY_MONERO_WEBHOOK_SECRET=${{ secrets.BTCPAY_MONERO_WEBHOOK_SECRET }} \
BTCPAY_FIRO_STORE_ID=${{ secrets.BTCPAY_FIRO_STORE_ID }} \
BTCPAY_FIRO_WEBHOOK_SECRET=${{ secrets.BTCPAY_FIRO_WEBHOOK_SECRET }} \
BTCPAY_PRIVACY_GUIDES_STORE_ID=${{ secrets.BTCPAY_PRIVACY_GUIDES_STORE_ID }} \
BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET=${{ secrets.BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET }} \
BTCPAY_GENERAL_STORE_ID=${{ secrets.BTCPAY_GENERAL_STORE_ID }} \
BTCPAY_GENERAL_WEBHOOK_SECRET=${{ secrets.BTCPAY_GENERAL_WEBHOOK_SECRET }} \
BTCPAY_STORE_ID=${{ secrets.BTCPAY_STORE_ID }} \
BTCPAY_WEBHOOK_SECRET=${{ secrets.BTCPAY_WEBHOOK_SECRET }} \
docker compose up -d --build
EOF
10 changes: 2 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,8 @@ services:

BTCPAY_URL: ${BTCPAY_URL}
BTCPAY_API_KEY: ${BTCPAY_API_KEY}
BTCPAY_MONERO_STORE_ID: ${BTCPAY_MONERO_STORE_ID}
BTCPAY_MONERO_WEBHOOK_SECRET: ${BTCPAY_MONERO_WEBHOOK_SECRET}
BTCPAY_FIRO_STORE_ID: ${BTCPAY_FIRO_STORE_ID}
BTCPAY_FIRO_WEBHOOK_SECRET: ${BTCPAY_FIRO_WEBHOOK_SECRET}
BTCPAY_PRIVACY_GUIDES_STORE_ID: ${BTCPAY_PRIVACY_GUIDES_STORE_ID}
BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET: ${BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET}
BTCPAY_GENERAL_STORE_ID: ${BTCPAY_GENERAL_STORE_ID}
BTCPAY_GENERAL_WEBHOOK_SECRET: ${BTCPAY_GENERAL_WEBHOOK_SECRET}
BTCPAY_STORE_ID: ${BTCPAY_STORE_ID}
BTCPAY_WEBHOOK_SECRET: ${BTCPAY_WEBHOOK_SECRET}

MONERO_APPLICATION_RECIPIENT: [email protected]
FIRO_APPLICATION_RECIPIENT: [email protected]
Expand Down
20 changes: 4 additions & 16 deletions env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ export const env = createEnv({

BTCPAY_URL: z.string().url(),
BTCPAY_API_KEY: z.string().min(1),
BTCPAY_MONERO_STORE_ID: z.string().min(1),
BTCPAY_MONERO_WEBHOOK_SECRET: z.string().min(1),
BTCPAY_FIRO_STORE_ID: z.string().min(1),
BTCPAY_FIRO_WEBHOOK_SECRET: z.string().min(1),
BTCPAY_PRIVACY_GUIDES_STORE_ID: z.string().min(1),
BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET: z.string().min(1),
BTCPAY_GENERAL_STORE_ID: z.string().min(1),
BTCPAY_GENERAL_WEBHOOK_SECRET: z.string().min(1),
BTCPAY_STORE_ID: z.string().min(1),
BTCPAY_WEBHOOK_SECRET: z.string().min(1),

MONERO_APPLICATION_RECIPIENT: z.string().email(),
FIRO_APPLICATION_RECIPIENT: z.string().email(),
Expand Down Expand Up @@ -92,14 +86,8 @@ export const env = createEnv({

BTCPAY_URL: process.env.BTCPAY_URL,
BTCPAY_API_KEY: process.env.BTCPAY_API_KEY,
BTCPAY_MONERO_STORE_ID: process.env.BTCPAY_MONERO_STORE_ID,
BTCPAY_MONERO_WEBHOOK_SECRET: process.env.BTCPAY_MONERO_WEBHOOK_SECRET,
BTCPAY_FIRO_STORE_ID: process.env.BTCPAY_FIRO_STORE_ID,
BTCPAY_FIRO_WEBHOOK_SECRET: process.env.BTCPAY_FIRO_WEBHOOK_SECRET,
BTCPAY_PRIVACY_GUIDES_STORE_ID: process.env.BTCPAY_PRIVACY_GUIDES_STORE_ID,
BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET: process.env.BTCPAY_PRIVACY_GUIDES_WEBHOOK_SECRET,
BTCPAY_GENERAL_STORE_ID: process.env.BTCPAY_GENERAL_STORE_ID,
BTCPAY_GENERAL_WEBHOOK_SECRET: process.env.BTCPAY_GENERAL_WEBHOOK_SECRET,
BTCPAY_STORE_ID: process.env.BTCPAY_STORE_ID,
BTCPAY_WEBHOOK_SECRET: process.env.BTCPAY_WEBHOOK_SECRET,

MONERO_APPLICATION_RECIPIENT: process.env.MONERO_APPLICATION_RECIPIENT,
FIRO_APPLICATION_RECIPIENT: process.env.FIRO_APPLICATION_RECIPIENT,
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
Loading

0 comments on commit d1d0c76

Please sign in to comment.