Skip to content

bottlesdevs/store

 
 

Repository files navigation

elementary

Store

The elementary OS merch store website



Update Translation status


This repository is an elixir website for https://store.elementary.io. It connects to Printful for products, and Stripe for payment processing.

Developing on elementary OS (or Ubuntu)

This guide assumes elementary OS 6 or Ubuntu 20.04; the steps should be similar for any Ubuntu-based OS, but may differ bassed on the exact distribution or version.

  1. Install Docker

    You can install Docker however you'd like, but we recommend following this DigitalOcean guide, including adding your user to the docker group.

  2. Install docker-compose

    Similarly, you can install docker-compose however you see fit, but the fastest way is probably via Python's pip:

    1. sudo apt install python3-pip
    2. pip3 install docker-compose
  3. Configure secrets for development

    Add your Printful API key to config/dev.secret.exs like so:

    import Config
    
    config :store, Printful.Api,
      api_key: "aaaaaaaa-bbbb-cccc:dddd-eeeeeeeeeeee"

    To test Stripe integration as well, add your Stripe test keys to config/dev.secret.exs:

    config :stripity_stripe,
      api_key: "sk_test_aBcDeFgHiJkLmNoPqRsTuVwX",
      public_key: "pk_test_zYxWvUtSrQpOnMlKjIhGfEdC"

That's it, you're all set to start contributing.

Running

This repository contains a docker-compose.yml file for easier development. Make sure you have docker-compose installed, then run these commands:

  1. docker-compose build to build the containers. If you make changes to any dependencies, or are getting issues where code does not seem to update, re-run this step.

  2. docker-compose up to start the server and dependencies. This is your main command and after you run steps 1 and 2, you should only need to run this command to get back up and running.

If you change any configuration/secrets, you need to restart docker-compose up for it to take effect.

Translations

All translations are extracted to the template files when new commits are pushed to master. If you would like to help translate this site, please see the elementary weblate instance.

Deploying

This repository is setup with continuous integration and deployment. If you want to deploy your changes, all you need to do is open a PR to the master branch. Once your PR is accepted and merged in, it will automatically be deployed.

License

This repository is made available under the terms of the GNU Affero General Public License version 3 or any later version. See LICENSE for details.

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 50.3%
  • HTML 36.4%
  • SCSS 10.4%
  • JavaScript 2.4%
  • Dockerfile 0.5%