fulfillr-dev: staging back-office container + Turso store prep

Add a second go-fulfillr container (fulfillr-dev) wired to the staging
Turso store + EasyPost/Stripe test keys via dev.json, served at
fulfillr-dev.debyltech.com (Caddy -> :9055), LAN-restricted like prod.

- fulfillr-dev.yml + dev.json.j2: the staging container, volumes, config
- defaults: fulfillr_dev_* vars; prod store URL stubbed off until cutover
- Caddyfile + caddy.yml: fulfillr-dev site block and static mount
- awsddns.yml: Route53 DDNS for the fulfillr-dev hostname
- production.json.j2: add store_database_url/store_auth, rename stripe key
  var to fulfillr_stripe_api_key
- vault.yml: dev + store/stripe secrets

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastian de Byl
2026-06-06 00:23:07 -04:00
parent 2640d09cb5
commit e82ace6de3
8 changed files with 207 additions and 1 deletions
@@ -389,6 +389,53 @@
}
}
# Fulfillr DEV/staging - {{ fulfillr_dev_server_name }} (Static + API with IP restrictions)
{{ fulfillr_dev_server_name }} {
{{ ip_restricted_site() }}
@api {
path /api/*
}
# Handle API requests with CORS for local development
handle @api {
header {
Access-Control-Allow-Origin "*"
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
Access-Control-Allow-Credentials "true"
}
# Handle preflight requests
@options {
method OPTIONS
}
handle @options {
respond "" 204
}
reverse_proxy localhost:9055
}
# Serve static files with SPA fallback
handle {
root * /usr/local/share/fulfillr-site-dev
try_files {path} {path}/ /index.html
file_server
}
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options "nosniff"
Referrer-Policy "same-origin"
}
log {
output file /var/log/caddy/fulfillr-dev.log
format json
}
}
# ============================================================================
# TEST/STAGING SITES
# ============================================================================
@@ -0,0 +1,48 @@
{# Staging back-office config (fulfillr-dev). Isolated dev tier:
- ecommerce store -> STAGING Turso (fulfillr_dev_store_*)
- EasyPost + Stripe -> TEST keys (fulfillr_dev_easypost_api_key / fulfillr_dev_stripe_api_key)
- AWS -> FulfillrAPI-Dev key (fulfillr_dev_access_key/secret_key), scoped to the -dev
DynamoDB tables + debyltech.reviewr.dev. Snipcart key + outreach HMAC secret are
reused read-only. Never touches prod data or live payment APIs. #}
{
"snipcart_api_key": "{{ snipcart_api_key }}",
"easypost_api_key": "{{ fulfillr_dev_easypost_api_key }}",
"stripe_api_key": "{{ fulfillr_dev_stripe_api_key }}",
"backinstock_table": "debyltech-backinstock-dev",
"cases_table": "debyltech-cases-dev",
"tickets_table": "debyltech-tickets-dev",
"store_database_url": "{{ fulfillr_dev_store_database_url }}",
"store_auth_token": "{{ fulfillr_dev_store_auth_token }}",
"aws": {
"access_key": "{{ fulfillr_dev_access_key }}",
"secret_key": "{{ fulfillr_dev_secret_key }}",
"region": "{{ fulfillr_region }}",
"bucket": "debyltech.reviewr.dev"
},
"tax": {
"ein": "{{ fulfillr_tax_ein }}",
"ioss": null
},
"sender_address": {
"city": "Newbury",
"country": "US",
"email": "sales@debyltech.com",
"name": "de Byl Technologies LLC",
"phone": "6034160859",
"state": "NH",
"street1": "976 Route 103",
"street2": "Unit 95",
"zip": "03255"
},
"outreach": {
"outreach_table": "debyltech-outreach-dev",
"unsubscribe_table": "debyltech-unsubscribe-dev",
"email_log_table": "debyltech-email-log-dev",
"reviews_table": "debyltech-reviews-dev",
"hmac_secret_arn": "{{ fulfillr_hmac_arn }}",
"ses_from_email": "noreply@debyltech.com",
"ses_reply_to": "support@debyltech.com",
"ses_region": "us-east-1",
"base_url": "https://debyltech.com"
}
}
@@ -1,10 +1,12 @@
{
"snipcart_api_key": "{{ snipcart_api_key }}",
"easypost_api_key": "{{ easypost_api_key }}",
"stripe_api_key": "{{ stripe_api_key }}",
"stripe_api_key": "{{ fulfillr_stripe_api_key }}",
"backinstock_table": "{{ fulfillr_backinstock_table }}",
"cases_table": "{{ fulfillr_cases_table }}",
"tickets_table": "{{ fulfillr_tickets_table }}",
"store_database_url": "{{ fulfillr_store_database_url }}",
"store_auth_token": "{{ fulfillr_store_auth_token }}",
"aws": {
"access_key": "{{ fulfillr_access_key }}",
"secret_key": "{{ fulfillr_secret_key }}",