2023-02-20 13:28:01 -07:00
|
|
|
# Shopity
|
2018-01-16 20:21:05 -07:00
|
|
|
|
2023-02-20 13:28:01 -07:00
|
|
|
Ecommerce template using 11ty, knockout, stripe, docker
|
2018-01-22 23:22:24 -07:00
|
|
|
|
2023-02-20 13:28:01 -07:00
|
|
|
## Setting shipping rates data
|
2018-01-25 20:34:34 -07:00
|
|
|
|
2023-02-20 13:28:01 -07:00
|
|
|
- **zips-to-zones:** [USPS Zone chart by zip code](https://postcalc.usps.com/DomesticZoneChart)
|
|
|
|
- **usps-shipping-rates:** [USPS Rates by zone/weight](https://pe.usps.com/text/dmm300/Notice123.htm#_c078)
|
2023-03-07 14:18:31 -07:00
|
|
|
|
|
|
|
## Website and API
|
|
|
|
|
|
|
|
```
|
|
|
|
docker-compose up
|
|
|
|
```
|
|
|
|
|
|
|
|
## Stripe hook
|
|
|
|
|
|
|
|
Runs on `HOOK_PORT`.
|
|
|
|
|
|
|
|
```
|
|
|
|
npm install
|
|
|
|
npm run stripe-webhook
|
|
|
|
```
|
|
|
|
|
|
|
|
`/etc/systemd/system/www-stripe-hook.service`
|
|
|
|
|
|
|
|
```
|
|
|
|
[Unit]
|
|
|
|
Description=Stripe webhook
|
|
|
|
Documentation=
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
WorkingDirectory=/usr/local/src/mysite
|
|
|
|
ExecStart=npm run stripe-webhook.js
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=default.target
|
|
|
|
```
|