{"id":15026522,"url":"https://github.com/inushin/dockernodessl","last_synced_at":"2026-03-16T21:31:49.287Z","repository":{"id":158754773,"uuid":"452216864","full_name":"Inushin/dockerNodeSSL","owner":"Inushin","description":"This is a complete stack for running a projects with Node, MongoDB, NGINX and PHP into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.","archived":false,"fork":false,"pushed_at":"2022-02-10T20:00:57.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T03:14:37.567Z","etag":null,"topics":["certbot","certbot-ssl","docker","docker-compose","mongodb","nginx","php","php74"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inushin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2022-01-26T09:36:51.000Z","updated_at":"2022-01-27T15:40:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbdc1b93-764c-4040-9d53-04d9818509b5","html_url":"https://github.com/Inushin/dockerNodeSSL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerNodeSSL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerNodeSSL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerNodeSSL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerNodeSSL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inushin","download_url":"https://codeload.github.com/Inushin/dockerNodeSSL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330323,"owners_count":20274039,"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":["certbot","certbot-ssl","docker","docker-compose","mongodb","nginx","php","php74"],"created_at":"2024-09-24T20:04:37.169Z","updated_at":"2025-12-28T01:23:16.831Z","avatar_url":"https://github.com/Inushin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐳 Docker + PHP 7.4 + MongoDB 4.4 + Nginx 15 + Certbot(HTTPS) + Node 13 🐳\n\n![NODE MONGO](https://user-images.githubusercontent.com/57062736/151140108-30752a2b-f5ed-4a15-89a7-8acbcdcf1eb5.png)\n\nIf you find this useful, remember about giving a start ⭐ to this repo or share it 🔁\n\nCreated from `https://github.com/Inushin/dockerSymfonySSL`\n\n## Description 📋\n\n![docker_facebook_share](https://user-images.githubusercontent.com/57062736/139103227-36f3cb32-c3c1-4158-b99e-25a31e955f44.png)\n\nThis is a complete stack for running projects with Node, MongoDB, NGINX and PHP into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.\n\nIt is composed by 5 containers:\n\n- `nginx`, acting as the webserver.\n- `php`, the PHP-FPM container with the 7.4 PHPversion.\n- `mongodb` which is the MongoDB database container with a **MongoDB 4.4** image.\n- `node` the Node container with the 13 Node version.\n- `certbot` generates the SSL certificate for your personal domain.\n\n## Installation ⌨\n\n![Docker Installation Illustration](https://user-images.githubusercontent.com/57062736/139102730-d6f51d53-ffb3-44bb-be5e-2bdf48d91295.png)\n\n0. You need ****Docker**** and ****Docker-compose**** where you are going to launch this so, if you do not have it... click [HERE](https://github.com/Inushin/dockerNodeSSL#installing-docker-and-docker-compose) or go to the end of this `.md` ^^\n\n1. Clone this rep.\n\n2. Check that the dir. `data/certbot/www/.well-known` exist. If it is not, create it 😀.\n\n3. Edit `init` with your domain and an email.\n\n4. Edit the `docker-compose.yml` with your DB information. \n\n5. Edit `data/nginx/node/index.js` with your domain.\n\n6. Run `./init`.\n\n7. Edit `data/nginx/web.conf` with your domain and your project dir.\n\n8. Run `docker-compose down`\n\n9. Run `docker-compose up -d`\n\n10. The 4 containers are deployed: \n\n```\nCreating docker_mongo_1   ... done\nCreating docker_php_1     ... done\nCreating docker_nginx_1   ... done\nCreating docker_node_1   ... done\nCreating docker-certbot-1 ... done\n```\n\n\n## Docker's useful commands 📑\n![Docker Commands Illustration](https://user-images.githubusercontent.com/57062736/139102966-25f28be1-f768-49bd-a8a1-915a8465de9e.png)\n\n\n- Run Docker-compose: `docker-compose up -d` / `docker-compose up`\n\n- Check Docker-compose's volumens status: `docker-compose ps -a` / `docker-compose ps`\n\n- Check Docker's images: `docker images -a`\n\n- Remove Docker's images: `docker rmi -f imageID1 imageID2 ...` (-f = force)\n\n- Enter to a Docker's volumen: `docker-compose exec VolumenID sh` / `docker-compose exec VolumenID bash`\n\n- Copy a file to the docker we want to: `docker cp file docker_id:/dir`\n\n- See all the configuration of the docker-compose.yml with the paths completed: `docker-compose config`\n\n- See all the information of a volumen (interesting of IPs): `docker inspect VOLUMEN_ID`\n\n- Remove all dangling (not tagged or associated with a container) containers, volumes, networks and images: `docker system prune`\n\n- Remove all unused containers and images with at least one container associated to them: `docker system prune -a`\n\n- Shows all unused local images: `docker images ls -f dangling=true`\n\n- Shows all unused local volumes: `docker volume ls -f dangling=true`\n\n- Remove all local volumes not used by at least one container: `docker volume prune`\n\n\n## Installing Docker and Docker-compose 🛠\n![Docker-composer](https://user-images.githubusercontent.com/57062736/141182130-b8ed2d7a-9a68-4387-b838-ba0d44bb4e0e.png)\n\n**Adjust the installation to your OS. Here you have the one for EC2(AWS) with CentOS**\n#\n- Docker installation\n\n1. Download and install Docker: `yum install docker`\n\n2. Gives permisions so you can run it everywhere: `usermod -a -G docker ec2-user`\n\n3. Starts Docker's service: `service docker start`\n\n4. Starts Docker's service each time you run the SO: `chkconfig docker on`\n#\n- Docker-compose installation\n\n1. Download and install Docker-compose: `curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose`\n\n2. Make it executable from anywhere: `chmod +x /usr/local/bin/docker-compose`\n\n3. Makes an direct access for docker-compose: `ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose`\n\n4. Check the version and the installation: `docker-compose --version`\n\n\n## ⭐ Feedback and bugs 🐞\n\nIf you find any bug or just want to give your feedback (remember the ⭐ ^^), **Feel free to do it**. I am, as you, constantly learning and things change so quickly that... no one knows ^^\n#\n\n\n## Version control 📝\n\n- 0.0.0 - Creation of the rep with the config finished - 26/01/2022\n- 0.0.1 - Updated useful Docker commands - 10/02/2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finushin%2Fdockernodessl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finushin%2Fdockernodessl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finushin%2Fdockernodessl/lists"}