{"id":20147735,"url":"https://github.com/isur/web-app-setup","last_synced_at":"2026-06-07T03:32:54.139Z","repository":{"id":216274901,"uuid":"740696563","full_name":"Isur/web-app-setup","owner":"Isur","description":"Example setup of app with frontend, backend, nginx, ssl, database, ci/cd","archived":false,"fork":false,"pushed_at":"2024-01-19T21:33:32.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T11:17:20.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Isur.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-08T21:54:16.000Z","updated_at":"2024-01-11T22:00:55.000Z","dependencies_parsed_at":"2024-01-12T00:11:02.086Z","dependency_job_id":"5d3e92f4-a02a-4cc3-ae84-e06fde6c7b5c","html_url":"https://github.com/Isur/web-app-setup","commit_stats":null,"previous_names":["isur/web-app-setup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isur%2Fweb-app-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isur%2Fweb-app-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isur%2Fweb-app-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Isur%2Fweb-app-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Isur","download_url":"https://codeload.github.com/Isur/web-app-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587802,"owners_count":19986628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-13T22:31:32.196Z","updated_at":"2025-11-30T09:03:53.188Z","avatar_url":"https://github.com/Isur.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n### What is this repo?\nRepository contains example setup for web application with docker compose file.\n\nIt might be used to spin up development server without much config.\n\nThere are example apps and github workflows with testing and deployment.\n\n### What you can find here?\n- docker-compose.yml with config for:\n    - postgresql\n    - nginx\n    - backend\n    - frontend\n    - certbot\n- configs\n    - nginx.conf for server without ssl certs\n    - nginx.conf for server with ssl certs\n- github workflows\n    - Testing on all branches for backend and frontend\n    - Deployment on master for backend and frontend\n- apps\n    - example frontend app with nextjs\n    - example backend app with nestjs\n- deploy script\n    - it will restart app after uploading new image\n\n# Prerequisites\nTo use this you will need:\n- server, vps\n    - docker \n    - docker compose\n- some knowledge of using ssh\n\nOptional:\n- domain - so you can use certbot\n- github - so github actions can be run\n\n# Basic setup\n- In docker compose change values for:\n    - docker image names\n    - docker container names\n    - (if you want use ssl) certbot {email} and {domain}\n- Setup\n    - environment variables for your projects\n- nginx config\n    - set correct domain\n    - change other settings if needed\n- images\n    - upload images of containers or upload them to registry\n- apps\n    - adjust to your needs\n- workflows\n    - adjust to your needs\n- github\n    - setup secrets that will be used in workflows\n- deploy\n    - you might want to change profile that is used for deployment (ssl, no-ssl)\n\n# Profiles\nDocker compose file has 3 profiles:\n- ssl - to run app with ssl - starts frontend, backend, nginx, database\n- no-ssl - to run app without ssl - starts frontend, backend, nginx, database,\n- certbot - to just run a certbot\n\nTo run specific profile use `--profile` flag when running docker compose.\n\nIf domain is setup, use cerbot to generate certificates.\n\n# SSL\nIf you want to have SSL certs you need a domain. Setup it in `config/nginx/nginx.conf`.\nChange certbot command in `docker-compose.yml`, replace `{domain}` and `{email}`.\n\nAfter those changes just run:\n```bash\ndocker compose --profile certbot up\n```\n\nCerts are generated for some time only, so you need to refresh them from time to time! You can use cron or do it manually.\n\n# Usage\nFew commands to start apps in detach mode:\n\nTo run web without ssl:\n```bash\ndocker compose --profile no-ssl up -d\n```\n\nTo run web with ssl:\n```bash\ndocker compose --profile ssl up -d\n```\n\n\n# Images\nUploading images with apps:\n\n```bash\ndocker save image_name | ssh -C username@hostname docker load\n```\n\nOr use other ways to create or download images.\n\nAfter updating the images remeber about restarting the container!\n\n```bash\ndocker compose --profile {profile you want to use} up -d\n```\n\n# Automation\nThere are prepared github workflows that will upload image to the server and run restart script. \n\nYou migth want to adjust names/script/profiles so everything is correctly setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisur%2Fweb-app-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisur%2Fweb-app-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisur%2Fweb-app-setup/lists"}