{"id":48522724,"url":"https://github.com/luis122448/smart-shell-bash","last_synced_at":"2026-04-07T21:32:52.535Z","repository":{"id":210612711,"uuid":"727015679","full_name":"luis122448/smart-shell-bash","owner":"luis122448","description":"Este repositorio tiene como objetivo documentar, estandarizar y automatizar el despliegue del proyecto Smart-Shell ( Facturador Electronico ), integrado por cinco repositorios independientes en un mismo servidor.","archived":false,"fork":false,"pushed_at":"2025-09-15T05:12:09.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T05:43:26.768Z","etag":null,"topics":["bash","bash-scripting","cerbot","nginx","nginx-proxy","ssh-key"],"latest_commit_sha":null,"homepage":"https://smart-shell.luis122448.com/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luis122448.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2023-12-04T02:14:53.000Z","updated_at":"2025-09-15T05:12:13.000Z","dependencies_parsed_at":"2023-12-16T00:12:57.034Z","dependency_job_id":"1f143000-9f06-41df-a7fb-7cf33dc615f4","html_url":"https://github.com/luis122448/smart-shell-bash","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.1875,"last_synced_commit":"d376d57c7e88f34bf01cd2e7ecc04ad7a739b201"},"previous_names":["luis122448/smart-shell-bash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luis122448/smart-shell-bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luis122448%2Fsmart-shell-bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luis122448%2Fsmart-shell-bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luis122448%2Fsmart-shell-bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luis122448%2Fsmart-shell-bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luis122448","download_url":"https://codeload.github.com/luis122448/smart-shell-bash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luis122448%2Fsmart-shell-bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31530642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bash","bash-scripting","cerbot","nginx","nginx-proxy","ssh-key"],"created_at":"2026-04-07T21:32:52.417Z","updated_at":"2026-04-07T21:32:52.510Z","avatar_url":"https://github.com/luis122448.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Project Logo](./resources/logo.png)\n\n# Smart Shell - Deployment Automation\n\nThis repository provides a collection of scripts and configurations to automate the deployment of the Smart-Shell project. It offers multiple deployment strategies, including a script-based approach for local development, a Docker Compose setup for single-server deployments, and Kubernetes manifests for scalable environments.\n\nThe automation handles environment variable configuration, repository cloning, SSL certificate generation, and reverse proxy setup to streamline both development and production workflows.\n\n## Repositories\n\n### Main Repository\n- [Smart-Shell-Bash](https://github.com/luis122448/smart-shell-bash)\n\n### Related Repositories\n\n- [Smart-Shell-Postgres](https://github.com/luis122448/smart-shell-postgres)\n  PostgreSQL: Database for storing structured data.\n- [Smart-Shell-Mongo](https://github.com/luis122448/smart-shell-mongo)\n  MongoDB: Database for storing unstructured data.\n- [Smart-Shell-Redis](https://github.com/luis122448/smart-shell-redis)\n  Redis: Database for storing key-value data.\n- [Smart-Shell-SpringBoot](https://github.com/luis122448/smart-shell-springboot)\n  SpringBoot: Backend for the business logic.\n- [Smart-Shell-Angular](https://github.com/luis122448/smart-shell-angular)\n  Angular: Frontend for the user interface.\n\n## Development Environment Setup\n\nThis describes the setup for a local development environment, where each service runs in its own Docker container.\n\n### Installation\n\n1.  **Create a new directory**\n\n```bash\nsudo mkdir -p /var/www/smart-shell/configurations\n```\n\n2.  **Change the owner of the directory**\n\n```bash\nsudo chown -R $USER:$USER /var/www/smart-shell\n```\n\n3.  **Clone the repository**\n\n```bash\ncd /var/www/smart-shell/configurations\ngit clone https://github.com/luis122448/smart-shell-bash.git\ncd smart-shell-bash\n```\n\n\n4.  **Run the installation script with required parameters**\n\nYou must provide the database username and password as parameters. Ports for each service have defaults, but can be overridden with flags.\n\n**Required parameters:**\n- `-u \u003cusername\u003e`: Database username\n- `-p \u003cpassword\u003e`: Database password\n\n**Optional port parameters:**\n- `-pp \u003cpostgres_port\u003e`: PostgreSQL port (default: 10001)\n- `-rp \u003credis_port\u003e`: Redis port (default: 10002)\n- `-mp \u003cmongo_port\u003e`: MongoDB port (default: 10003)\n- `-sp \u003cspringboot_port\u003e`: SpringBoot port (default: 10004)\n- `-ap \u003cangular_port\u003e`: Angular port (default: 10005)\n\n**Example usage:**\n```bash\nbash install.sh -u myuser -p mypass\n```\nOverride ports if needed:\n```bash\nbash install.sh -u myuser -p mypass -pp 5432 -rp 6379 -mp 27017 -sp 8080 -ap 4200\n```\n\n**Note:** The password provided will be used for all database configurations.\n\n5.  **Execute the installation script**\n\n\nSee above for required parameters.\n\n6.  **Verify the installation**\n\nThis will clone all the related project repositories into the `deployments` directory.\n\n```bash\ntree /var/www/smart-shell/deployments\n```\n\n### Local Development Workflow\n\n1.  **Execute the deployment script**\n\nThis script builds and starts the Docker containers for each service.\n\n```bash\nbash deploy.sh\n```\n\n2.  **Verify the deployment**\n\n```bash\nsudo docker ps\n```\n\n## Deployment Options\n\nThis project offers two main ways to deploy the application stack for production or staging environments: Docker Compose and Kubernetes.\n\n\n### Docker Compose Deployment\n\nThe `docker/` directory contains the necessary files to deploy the entire application stack using Docker Compose. This is a straightforward method for single-server deployments.\n\n1.  **Navigate to the docker directory:**\n\n```bash\ncd docker\n```\n\n2.  **Configure Environment Variables:**\n\nThe configuration is managed via a `.env` file. You should use the provided `backup.env` as a starting point.\n\n```bash\n# 1. Copy the backup file to a new .env file\ncp backup.env .env\n\n# 2. Open the .env file and customize it\nnano .env\n```\n\nInside the `.env` file, you must set the passwords for the databases and can customize ports, domains for CORS, and other parameters.\n\n3.  **Deploy:**\n\nUse the `deploy.sh` script within the `docker` directory to manage the deployment.\n\n```bash\nbash deploy.sh\n```\n\nThis script will handle the creation of necessary directories and start the services defined in `docker-compose.yml`.\n\n\n### Kubernetes Deployment\n\nFor scalable and resilient deployments, you can use the Kubernetes manifests located in the `kubernetes/` directory.\n\n1.  **Navigate to the kubernetes directory:**\n\n```bash\ncd kubernetes\n```\n\n2.  **Configure the Deployment:**\n\n-   **Domains:** Open the `configmap.yml` file to configure the `INGRESS_HOST` (your domain) and other service-related URLs like `CORS_ALLOWED_ORIGINS`.\n-   **Passwords:** The database passwords are not set here. They will be passed securely as a parameter to the deployment script.\n\n3.  **Run the Deployment Script:**\n\nA convenience script, `deploy.sh`, is provided to apply all the manifests in the correct order. You must provide a password for the databases using the `-p` flag.\n\n```bash\nbash deploy.sh -p \u003cyour-database-password\u003e\n```\n\nThis script will:\n- Create the namespace `smart-shell-production`.\n- Create a secret with the provided database password.\n- Apply the ConfigMap with your domain configuration.\n- Deploy all databases and applications.\n- Dynamically configure and apply the Ingress resource based on the settings in the `configmap.yml`.\n\n## Production SSL and Nginx Configuration\n\nFor production deployments that are not on Kubernetes, you may need to configure Nginx as a reverse proxy with SSL.\n\nReview the `README.md` file in `./scripts/ssh/` to generate SSL certificates for your domain. Additionally, review the instructions in `./scripts/proxy/README.md` for configuring Nginx.\n\n```\nsmart-shell-bash/\n├── scripts/\n│   ├── ssh/\n│   │   ├── README.md\n│   │   └── ...\n│   ├── proxy/\n│   │   ├── luis122448.com.conf (Example for Frontend)\n│   │   ├── luis122448.dev.conf (Example for Backend)\n│   │   ├── options-ssl-nginx.conf\n│   │   ├── README.md\n│   │   └── ...\n│   └── ...\n└── ...\n```\n\n## Contributing\n\nAll contributions are welcome. For more information, please refer to the [CONTRIBUTING](./CONTRIBUTING.md) file.\n\n## License\n\nThis project is licensed under the terms of the [Creative Commons Attribution-NonCommercial 4.0 License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluis122448%2Fsmart-shell-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluis122448%2Fsmart-shell-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluis122448%2Fsmart-shell-bash/lists"}