{"id":13695287,"url":"https://github.com/starters-dev/https-backend","last_synced_at":"2026-02-23T08:06:38.305Z","repository":{"id":61917809,"uuid":"463283343","full_name":"starters-dev/https-backend","owner":"starters-dev","description":"🔐 Universal HTTPS Backend. Run Docker (Compose) services behind Traefik w/ HTTPS. Includes PostgreSQL, Redis, Plausible Analytics, Frontend app, etc.","archived":false,"fork":false,"pushed_at":"2022-10-23T21:32:32.000Z","size":62,"stargazers_count":23,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T22:32:52.394Z","etag":null,"topics":["digitalocean","docker","docker-compose","https-proxy","letsencrypt","plausible-analytics","postgresql","react","redis","traefik"],"latest_commit_sha":null,"homepage":"https://backend.starters.dev","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/starters-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-24T19:56:44.000Z","updated_at":"2024-08-18T19:34:08.000Z","dependencies_parsed_at":"2023-01-20T09:20:55.314Z","dependency_job_id":null,"html_url":"https://github.com/starters-dev/https-backend","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/starters-dev/https-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starters-dev%2Fhttps-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starters-dev%2Fhttps-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starters-dev%2Fhttps-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starters-dev%2Fhttps-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starters-dev","download_url":"https://codeload.github.com/starters-dev/https-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starters-dev%2Fhttps-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29739802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digitalocean","docker","docker-compose","https-proxy","letsencrypt","plausible-analytics","postgresql","react","redis","traefik"],"created_at":"2024-08-02T18:00:20.700Z","updated_at":"2026-02-23T08:06:38.272Z","avatar_url":"https://github.com/starters-dev.png","language":"Shell","funding_links":["https://github.com/sponsors/plausible"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# 🔐 Universal HTTPS Backend\n\n![Traefik](https://img.shields.io/badge/Proxy-Traefik-skyblue)\n![HTTPS](https://img.shields.io/badge/HTTPS-Configured-green)\n![PostgreSQL](https://img.shields.io/badge/Database-PostgreSQL-blue)\n![Redis](https://img.shields.io/badge/Cache-Redis-red)\n![Plausible](https://img.shields.io/badge/Analytics-Plausible-purple)\n![Website](https://img.shields.io/badge/Frontend-React%20App-blue)\n\nThis repository is a minimalistic setup for running services with Docker Compose behind Traefik and autogenerated `https` certificates.\n\nLet's say, you have the `API` service (e.g. NodeJS app), React app for frontend and would like to make it available via `https://api.your-domain.com` and `https://dashboard.your-domain.com`, then you are at the right place!\n\nIt includes the collection of `docker-compose` files and bash scripts that automate and simplify startup of your project, by taking care of some DevOps routine. List with available services can be found at [Services section](#services).\n\n\u003e _HTTPS Backend_ is a part of [starters.dev](https://github.com/starters-dev) collection.\n\n## Getting Started\n\n### Quickstart\n\n1. Connect to your remote server\n\n```bash\n\u003e ssh root@IP_ADDRESS\n```\n\n\u003e Hint: you can use a cloud computing providers such as [DigitalOcean](https://digitalocean.com).\n\n2. Clone this repo\n\n```bash\n\u003e git clone https://github.com/starters-dev/https-backend backend\n\u003e cd backend\n```\n\n3. Run `setup` script and fill in `env` variables\n\n```bash\n\u003e bash setup.sh\n\u003e nano .env\n```\n\nCheck [Environment variables](#environment-variables) section for more information.\n\n4. Get a service repo\n\n\u003e Our example is based on [backend.starters.dev-website](https://github.com/starters-dev/backend.starters.dev-website) repo.\n\n```bash\n\u003e git clone https://github.com/starters-dev/backend.starters.dev-website services/frontend\n```\n\n5. Build and run\n\n```bash\n\u003e bash build.sh\n```\n\nIt will setup everything, including https certificates, and will start Docker Compose services in the background.\n\n### Service creation\n\nIf you'd like to add your own service, then you should follow the steps below to keep the same structure:\n\n1. Add service's Docker Compose file `services/docker-compose.YOUR_SERVICE.yml`.\n\n2. `(optional)` Add service's folder `services/YOUR_SERVICE`. For example, if you are going to store some data or configuration files only related to that service.\n\n3. `(optional)` Add service's script file `services/YOUR_SERVICE/index.sh`. For example, if you need to craete some folders in advance on `setup` step.\n\n### Service deletion\n\nIf you don't need a service, you can easily delete it by running:\n\n```bash\n\u003e bash run/sdel.sh SERVICE_NAME\n```\n\nFor example, if you don't need `postgresql` service, you will run `bash run/sdel.sh postgresql` and it will delete related files.\n\n## Structure\n\nThe folder structure is pretty simple but lets you reuse and write less boilerplate code.\n\n- `docker-compose.main.yml` - main Docker Compose file with DNS challence, ACME and ports configuration.\n- `build.sh` - `build` script that runs `setup` script with all scripts under `run/services` folder and builds and runs Docker images in background.\n- `.env` - list of environment variables.\n- `run/` - folder with general bash scripts.\n- `services/` - folder with Docker services files. For example, if you have `redis` service, then you would have `services/docker-compose.redis.yml` with specific configuration for `redis` service. Or if your service is a frontend app, then you'll need to clone it to `services/frontend/` and create `services/docker-compose.frontend.yml`.\n- `services/your-service/` - folder with your service, for ex. `frontend`.\n\n## What's inside\n\nThe setup uses [Traefik](https://github.com/traefik/traefik), the cloud native application proxy, to simplify the process of getting `https` certificates and the way to describe services.\n\nYou can always delete existing (if you don't need them) or add your own services, just make sure to apply necessary changes.\n\n### Services\n\n---\n\n[PostgreSQL](https://www.postgresql.org) - open source object-relational database known for reliability and data integrity.\n\nIt uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/postgresql).\n\n\u003cdetails\u003e\n\u003csummary\u003eEnv variables\u003c/summary\u003e\n\n- `POSTGRESQL_USERNAME` - username for PostgreSQL.\n- `POSTGRESQL_PASSWORD` - password for PostgreSQL.\n- `POSTGRESQL_DATABASE` - name of the database in PostgreSQL.\n\n\u003c/details\u003e\n\n---\n\n[Redis](https://redis.io) - open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker.\n\nIt uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/redis).\n\n\u003cdetails\u003e\n\u003csummary\u003eEnv variables\u003c/summary\u003e\n\n- `REDIS_PASSWORD` - password for Redis.\n- `REDIS_DISABLE_COMMANDS` - commands disabled from execution.\n\n\u003c/details\u003e\n\n---\n\n[Plausible](https://plausible.io) - simple and privacy-friendly Google Analytics alternative.\n\n[Official documentation](https://plausible.io/docs/self-hosting).\n\n\u003cdetails\u003e\n\u003csummary\u003eEnv variables\u003c/summary\u003e\n\n`services/plausible/conf.env` file:\n\n- `SECRET_KEY_BASE` - secret key of your app. Can be generated by running `openssl rand -base64 64 | tr -d '\\n' ; echo`.\n- `BASE_URL` - base url where this instance is accessible, including the scheme (eg. `http://` or `https://`), the domain name, and optionally a port.\n- `ADMIN_USER_EMAIL` - admin email.\n- `ADMIN_USER_NAME` - admin usenamename.\n- `ADMIN_USER_PWD` - admin password.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTroubleshooting\u003c/summary\u003e\n\n- [ClickHouse] _Database plausible_events_db doesn't exist_. If you encounter this issue, check out [this comment](https://github.com/plausible/hosting/issues/49#issuecomment-1229183219) for the solution.\n\n\u003c/details\u003e\n\n\u003e If you use [Plausible](https://github.com/plausible) in production, consider [sponsoring](https://github.com/sponsors/plausible) them.\n\n---\n\n[Frontend app](https://backend.starters.dev) - simple [Remix (React) app](https://github.com/starters-dev/backend.starters.dev-website).\n\n---\n\n### Env variables\n\nCurrent setup requires you to fill in `.env` file with variables that are used in services.\n\n- `DOMAIN_NAME` - your registered domain.\n- `DO_AUTH_TOKEN` - Digital Ocean token that is going to be used for DNS challenge and generating https certificates. It's required by Traefik and they provide other options, you can find them [here](https://doc.traefik.io/traefik/https/acme/#providers). If you'd like to continue with Digital Ocean, then you can create a token in `Dashboard` -\u003e `API` -\u003e `Tokens/Keys`.\n- `ACME_EMAIL` - email that is used for [Let's Encrypt](https://letsencrypt.org) and `https` certificates.\n- `GITHUB_TOKEN` - `(optional)` github token for private repos.\n\n## Enhancements\n\nThere are still some things I would like to add to the backend setup:\n\n- [x] [PostgreSQL](https://www.postgresql.org) - open source object-relational database known for reliability and data integrity.\n- [x] [Redis](https://redis.io) - open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker.\n- [x] [Plausible](https://plausible.io) - simple and privacy-friendly Google Analytics alternative.\n- [ ] [GlitchTip](https://glitchtip.com) - open source reimplementation of Sentry error tracking platform.\n- [ ] [Cal.com](https://cal.com) - scheduling infrastructure for absolutely everyone. [Github repo](https://github.com/calcom/docker).\n- [ ] [Mattermost](https://mattermost.com) - open source platform for developer collaboration. [Github repo](https://github.com/starters-dev/mattermost).\n- [ ] [Taiga](https://www.taiga.io) - open source, self-hosted project management tool. [Github repo](https://github.com/starters-dev/taiga).\n- [ ] [Focalboard](https://focalboard.com) - open source, self-hosted alternative to Trello, Notion, and Asana. [Github repo](https://github.com/starters-dev/focalboard).\n- [ ] Github actions or similar technique\n\n## Why?\n\nWhile developing `API` and similar services for mobile apps, you can not really access `localhost` (on mobile device) if, let's say, you have running Docker image on you local machine. Also you have to make only `https` requests from mobile app.\n\nAnother reason was to have `PostgreSQL` and `Redis` always running in the cloud but for cheap cost. You can run both of them easily on the $6 server.\n\n#### Note\n\nThis backend setup is a great fit if you just want to start writing business logic without messing with DevOps and spending a few days on that what's already has been done for you. It can be used for development and early production stages (of course, depends on your project), however, it's strongly **recommended** to have services like `PostgreSQL`, `Redis`, and similar to be seperated and independent on production stage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarters-dev%2Fhttps-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarters-dev%2Fhttps-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarters-dev%2Fhttps-backend/lists"}