{"id":16058747,"url":"https://github.com/andyatkinson/my_web_app","last_synced_at":"2026-05-03T11:37:18.438Z","repository":{"id":66952281,"uuid":"173363268","full_name":"andyatkinson/my_web_app","owner":"andyatkinson","description":"Learning docker and docker compose","archived":false,"fork":false,"pushed_at":"2019-11-19T21:37:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T12:31:29.859Z","etag":null,"topics":["docker","docker-compose","python"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/andyatkinson.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":"2019-03-01T20:23:31.000Z","updated_at":"2019-11-19T21:38:00.000Z","dependencies_parsed_at":"2023-05-15T18:30:44.823Z","dependency_job_id":null,"html_url":"https://github.com/andyatkinson/my_web_app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andyatkinson/my_web_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fmy_web_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fmy_web_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fmy_web_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fmy_web_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyatkinson","download_url":"https://codeload.github.com/andyatkinson/my_web_app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fmy_web_app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["docker","docker-compose","python"],"created_at":"2024-10-09T03:40:30.435Z","updated_at":"2026-05-03T11:37:18.409Z","avatar_url":"https://github.com/andyatkinson.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Docker intro\n\n\u003chttps://medium.com/@kelvin_sp/docker-introduction-what-you-need-to-know-to-start-creating-containers-8ffaf064930a\u003e\n\n\nMore\n\nCMD, ENTRYPOINT\n\n\u003chttps://medium.freecodecamp.org/docker-entrypoint-cmd-dockerfile-best-practices-abc591c30e21\u003e\n\n`./entrypoint.sh`\n\n\n## Docker Compose\n\nhttps://www.youtube.com/watch?v=4EqysCR3mjo\n\nBuild and run multi-container apps. One form is Docker Compose file, also `docker-compose` command.\n\n* `entrypoint: /entrypoint.sh`\n* `CMD (Dockerfiles) / command (Docker Compose files)`\n\nhttps://docs.docker.com/compose/overview/\n\nDocker compose files, \"network\".\nCan only run docker compose on single machine.\nSwarm is the orchestration solution provided by docker. (cluster)\n\n* `docker-compose build`\n* `docker-compose up -d`\n* `docker network ls`\n\nRefer to the container by the name of the service\n\nSecrets are used in Docker Swarm\n\ndockerfile option within docker-compose build section\n\n* `docker-compose ps`\n* `docker-compose logs -f`\n* `docker-compose stop` # does not remove containers\n* `docker-compose start`\n* `docker-compose restart`\n\n## Execute redis query on redis-cli, from within docker redis\n\n* `docker-compose exec redis redis-cli lrange students 0 -1`\n* `docker-compose exec app /bin/bash` # start up a shell\n* `docker-compose run...` # starts up a new container, as opposed to exec uses a running container\n\nPort mapping will not be intact in this case\n\nCan change port mapping, e.g. from 5000:5000 to 80:5000, and do another `docker-compose up` and everything is updated.\nCan do a `curl localhost` and get the desired response on port 80\n\n## Scaling\n\nStart more than one container for a service\n\n* `docker-compose up --scale app=3`\n\n## Volumes\n\n* `docker volume ls`\n\n\n## Networks\n\n* `docker network ls`\n* `docker network prune`\n\nDocker compose `push` to push to a repository\n\nDocker compose `pull` to download all the images necessary. (Docker playground)\n\n### .env file\n\n\n\n### How to use multiple compose files in a single project\n\ne.g. `docker-compose.override.yml`\n\ne.g. make it run on port 5000 and port 80\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyatkinson%2Fmy_web_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyatkinson%2Fmy_web_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyatkinson%2Fmy_web_app/lists"}