{"id":24272473,"url":"https://github.com/adham-2002/quotes_app","last_synced_at":"2026-04-12T13:06:57.202Z","repository":{"id":271232323,"uuid":"912547829","full_name":"adham-2002/Quotes_App","owner":"adham-2002","description":"simple quotes application ","archived":false,"fork":false,"pushed_at":"2025-01-12T15:38:25.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T19:38:39.907Z","etag":null,"topics":["docker","docker-compose","docker-image","express-js","postgresql"],"latest_commit_sha":null,"homepage":"","language":"EJS","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/adham-2002.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":"2025-01-05T21:50:28.000Z","updated_at":"2025-01-12T15:38:27.000Z","dependencies_parsed_at":"2025-01-07T02:46:40.400Z","dependency_job_id":null,"html_url":"https://github.com/adham-2002/Quotes_App","commit_stats":null,"previous_names":["adham-2002/quotes_app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-2002%2FQuotes_App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-2002%2FQuotes_App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-2002%2FQuotes_App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-2002%2FQuotes_App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adham-2002","download_url":"https://codeload.github.com/adham-2002/Quotes_App/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241977531,"owners_count":20051839,"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":["docker","docker-compose","docker-image","express-js","postgresql"],"created_at":"2025-01-15T18:26:38.136Z","updated_at":"2026-04-12T13:06:57.157Z","avatar_url":"https://github.com/adham-2002.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"## commands used =\u003e \n\n`docker compose up -d` :  \n* start and run container in docker compose.yml \n* -d (detached mode) runs the containers in the background without attaching them to your terminal.\n* `--build` this will forces build new image\n\n`docker compose logs`: \n* to see the logs for the containers `-f` for real time\n\n`docker compose down -v `: \n* to stop containers \n* remove volumes \n* remove network \n\n`docker exec -it postgres-db psql -U user -d myappdb`\n* logged in as user \n* with database name myappdb\n\n`docker stats express-app`\n* show resourse usage \n\n`docker network inspect networking_name` \n* see information about network like container and ip for gateway for this containers\n\nHere’s an improved version of your steps for attaching Docker to the container, installing Docker Compose, and integrating Jenkins with GitHub using webhooks:\n\n---\n\n## **1. Attaching Docker to Jenkins Container**\n\nIn order to allow Jenkins running inside a container to use Docker on the host system, we need to attach the Docker socket. This enables Jenkins to manage Docker containers directly from within its container.\n\n### **Steps:**\n```bash\ndocker run -d \\\n  --name jenkins \\\n  --privileged \\\n  -v /var/run/docker.sock:/var/run/docker.sock \\  # Mount Docker socket\n  -v jenkins_home:/var/jenkins_home \\  # Persist Jenkins data\n  -p 8080:8080 \\  # Jenkins Web UI\n  -p 50000:50000 \\  # Jenkins agent communication\n  jenkins/jenkins:lts  # Use the Jenkins LTS image\n```\n\nExplanation:\n- `--privileged` allows the Jenkins container to interact with Docker on the host.\n- `-v /var/run/docker.sock:/var/run/docker.sock` ensures that Docker commands issued from inside the Jenkins container are forwarded to the host's Docker daemon.\n- `-v jenkins_home:/var/jenkins_home` persists Jenkins data so it survives container restarts.\n\n---\n\n## **2. Installing Docker Compose Plugin Inside Jenkins Container**\n\nDocker Compose is used to define and run multi-container Docker applications. To allow Jenkins to use Docker Compose from within the container, follow these steps:\n\n### **Steps:**\n```bash\n# Install Docker Compose plugin\nmkdir -p ~/.docker/cli-plugins/  # Create the directory for Docker Compose plugin\ncurl -SL \"https://github.com/docker/compose/releases/download/v2.32.2/docker-compose-$(uname -s)-$(uname -m)\" -o ~/.docker/cli-plugins/docker-compose  # Download Docker Compose\nchmod +x ~/.docker/cli-plugins/docker-compose  # Make it executable\ndocker compose version  # Verify installation\n```\n\nExplanation:\n- This installs Docker Compose as a plugin within Docker CLI in your Jenkins container, enabling Jenkins to run `docker compose` commands.\n\n---\n\n## **3. GitHub Webhook Integration with Jenkins**\n\n### **Using Smee.io for Webhook Payload Delivery:**\nTo allow Jenkins to respond to GitHub push events, we need to expose localhost to the internet. Smee.io is a service that helps tunnel local webhook payloads to a publicly accessible URL.\n\n### **Steps:**\n\n1. **Setup Smee.io Webhook Tunnel:**\n\n   - Go to [Smee.io](https://smee.io/) and click \"Start a New Channel.\"\n   - This will provide you with a URL that forwards requests to your local Jenkins instance.\n\n2. **Run Smee Command:**\n\n   Open a terminal and run the following command to link the Smee.io service with your local Jenkins webhook URL:\n\n   ```bash\n   smee -u https://smee.io/your-channel-id --target http://localhost:8080/github-webhook/\n   ```\n\n   Replace `your-channel-id` with the channel ID provided by Smee.io. This will forward incoming webhook requests from GitHub to Jenkins.\n\n3. **Configure GitHub Webhook:**\n   - Go to your GitHub repository.\n   - Navigate to **Settings \u003e Webhooks \u003e Add webhook**.\n   - In the **Payload URL**, enter the URL provided by Smee.io (e.g., `https://smee.io/your-channel-id`).\n   - Set the content type to `application/json`.\n   - Select the events you want to trigger the webhook (e.g., **Push events**).\n\n4. **Test Webhook:**\n   After configuring the webhook in GitHub, push changes to your GitHub repository. Jenkins should trigger automatically, receiving the webhook payload and starting the appropriate jobs.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadham-2002%2Fquotes_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadham-2002%2Fquotes_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadham-2002%2Fquotes_app/lists"}