StretchShop is a fast and scalable e-business solution. Or you can call it an e-shop. The mission is to create a modern, open-source base for online business.
Package | Version | License |
---|---|---|
NodeJS | 18 | MIT |
MongoDB | 6 | Server Side Public License (SSPL) |
Nginx | 1.22 | 2-clause BSD |
PM2 | 5.2 | GNU-AGPL-3.0 |
Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.
In addition to creating a Droplet from the StretchShop 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB StretchShop Droplet in the SFO2 region, you can use the following curl
command. You need to either save your API access token) to an environment variable or substitute it in the command below.
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' -d \
'{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "stretchshop"}' \
"https://api.digitalocean.com/v2/droplets"
Your StretchShop droplet should be running preconfigured on your IP http://your_droplet_public_ipv4 with some demo data. The very first step to do should be log-in with the default login admin
and password az09bycxdw
and change your password to a strong and secure one. After that, you can change the settings of your StrechShop - name, delivery and payment methods, translations, and more.
Now to make it work on your domain and accept online payments you need to:
For more information about how to point your domain, see DigitalOcean documentation
https://docs.digitalocean.com/tutorials/dns-registrars/
https://docs.digitalocean.com/products/networking/dns/quickstart/
Please notice, that DigitalOcean is not selling domains itself.
You should get a certificate that protects communication between your shop and customer - see information about the free way how to do it at https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
Once you have your domain set and secured, you can move to the next step. If you want to make online payments work on StretchShop, there are two predefined options - Stripe (https://stripe.com/) and Paypal (https://www.paypal.com/). You have to register on these payment services so people that buy on your e-shop could send you money. Once registered, you need to get specific keys for your StretchShop instance to link it to your Stripe and PayPal accounts. How to find these codes/keys:
https://support.stripe.com/questions/locate-api-keys-in-the-dashboard
https://www.paypal.com/merchantapps/appcenter/streamlineoperations/apicredentials
Notice - don’t give these keys to anybody, as you don’t give your own keys.
Write them to “EVN” file located on your droplet.
$ ssh root@your_droplet_public_ipv4
$ cd /opt/strechshop/
.env
writing in terminal$ nano .env
Find Stripe and Paypal variables (STRIPE_PUBLISHABLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_ENDPOINT_SECRET and PAYPAL_CLIENT_ID, PAYPAL_SECRET) and set them to yours. Change the related environment variables (STRIPE_ENV and PAYPAL_ENV) according to how are you going to use this droplet (for testing only or if it is production/live).
To send and receive emails (about registration, orders and payments), you need to edit related variables in .env
file.
EMAIL_DEFAULTS_FROM="YourShopName support" <[email protected]>
EMAIL_DEFAULTS_SUBJECT='YourShopName - '
EMAIL_SMTP_HOST=smtp.yourdomain.tld
EMAIL_SMTP_PORT=587
EMAIL_SMTP_SECURE=false
[email protected]
EMAIL_SMTP_AUTH_PASS=yourPassword
EMAIL_SMTP_CIPHERS=SSLv3