All Projects → mozmeao → snippets-service

mozmeao / snippets-service

Licence: MPL-2.0 license
Service powering snippets on Firefox's about:home.

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
Jinja
831 projects
HTML
75241 projects
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to snippets-service

ServiceCommander-IBMi
Service Commander for IBM i
Stars: ✭ 29 (-9.37%)
Mutual labels:  service
FactoryOrchestrator
A cross-platform system service which provides a simple way to run and manage factory line validation, developer inner-loop, diagnostics, and fault analysis workflows.
Stars: ✭ 36 (+12.5%)
Mutual labels:  service
api
Core service used to handle events from clients
Stars: ✭ 36 (+12.5%)
Mutual labels:  service
ex aws rekognition
Package to use AWS Rekognition service
Stars: ✭ 21 (-34.37%)
Mutual labels:  service
angular-odata-es5
OData Service for Angular.io (es5 version)
Stars: ✭ 45 (+40.63%)
Mutual labels:  service
service-tree
[ABANDONED] A tree that stores services in its node for a given key, and allows traversing them.
Stars: ✭ 33 (+3.13%)
Mutual labels:  service
Molder
BDD steps libraries for test automation databases, web services, and WebUI
Stars: ✭ 16 (-50%)
Mutual labels:  service
background-service-lib
Essential classes for reliable background services.
Stars: ✭ 24 (-25%)
Mutual labels:  service
airad
Beego based Restful API service
Stars: ✭ 63 (+96.88%)
Mutual labels:  service
easemesh
A service mesh implementation for connecting, control, and observe services in spring-cloud.
Stars: ✭ 454 (+1318.75%)
Mutual labels:  service
backup-repository
Backup storage for E2E GPG-encrypted files, with multi-user, quotas, versioning, using a object storage (S3/Min.io/GCS etc.) and deployed on Kubernetes or standalone.
Stars: ✭ 21 (-34.37%)
Mutual labels:  service
Coyote
Framework providing operating system abstractions and a range of shared networking (RDMA, TCP/IP) and memory services to common modern heterogeneous platforms.
Stars: ✭ 80 (+150%)
Mutual labels:  service
airports-db
Public airports database API service based on GitHub
Stars: ✭ 17 (-46.87%)
Mutual labels:  service
hedera-hts-demo
This is a demonstration UI for the Hedera Token Service. Written in JavaScript and Vue.JS
Stars: ✭ 66 (+106.25%)
Mutual labels:  service
InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (+412.5%)
Mutual labels:  service
ssdp-client
The most lightweight asynchronous Java SSDP (Simple Service Discovery Protocol) Client
Stars: ✭ 46 (+43.75%)
Mutual labels:  service
ex aws sns
No description or website provided.
Stars: ✭ 19 (-40.62%)
Mutual labels:  service
WPWatcher
Wordpress Watcher is a wrapper for WPScan that manages scans on multiple sites and reports by email and/or syslog. Schedule scans and get notified when vulnerabilities, outdated plugins and other risks are found.
Stars: ✭ 34 (+6.25%)
Mutual labels:  service
acikseminer2020
servis ve süreçlerle ilgili basit örnekler
Stars: ✭ 41 (+28.13%)
Mutual labels:  service
senlin
Clustering service for managing homogeneous objects in OpenStack. Mirror of code maintained at opendev.org.
Stars: ✭ 43 (+34.38%)
Mutual labels:  service

snippets service

What's Deployed? Documentation RTFM Pipeline Pipeline

The root of all messaging.

Develop using Docker

One time setup of your environment and database:

  1. Make sure you have docker and docker-compose
  2. Setup an .env file with in the project root dir with at least:
    • SECRET_KEY set
    • DATABASE_URL=postgres://snippets:snippets@db:5432/snippets
    • PROD_DETAILS_DIR set to a writeable path, eg PROD_DETAILS_DIR=/home/webdev/
  3. $ docker-compose run --service-ports web bash
  4. [docker]$ ./manage.py update_product_details
    • If you get an error connecting to the database, you probably need to wait for a few seconds for PostgreSQL to initialize and then re-try the command.
  5. [docker]$ ./manage.py migrate
  6. [docker]$ ./manage.py createsuperuser (enter any user/email/pass you wish. Email is not required.)
  7. [docker]$ ./manage.py shell -c 'from snippets.base.util import *; create_countries();'
    • Create a list of Countries from Product Details info. Note that create_locales() no longer exists.

Start the development server:

  1. [docker]$ ./bin/run-dev.sh
  2. Navigate to https://localhost:8443/admin and log in with the admin account created in step #4. See an TLS Security Exception? Go to TLS Certifcates section.

A note about using run instead of up

docker-compose run is more suitable for development purposes since you get a shell and from there you can run the webserver command. This way you can debug using set_trace() or restart the server when things go bad. The trick here is to use --service-ports flag to make docker compose map the required ports.

The project is configured for docker-compose up if that's your preference.

TLS Certificates

Firefox communicates with the snippets service only over secure HTTPS connections. For development, the runserver_plus command as executed in ./bin/run-dev.sh generates and uses a self-signed certificate.

You'll need to permanently accept the certificate, to allow Firefox to fetch Snippets from your development environment.

Run the tests

$ ./manage.py test --parallel

Rebuild your Docker Compose Envinronment

To rebuild your docker compose environment, first remove current images and containers and then run the build command.

$ docker-compose kill
$ docker-compose rm -f
$ docker-compose build

Install Therapist

Therapist is a smart pre-commit hook for git to ensure that committed code has been properly linted.

Install the hooks by running:

$ therapist install

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].