{"id":19617709,"url":"https://github.com/macagua/example.dockercompose.getstarted","last_synced_at":"2026-04-02T18:52:37.907Z","repository":{"id":137264166,"uuid":"264811774","full_name":"macagua/example.dockercompose.getstarted","owner":"macagua","description":"Example from the 'Get started with Docker Compose' Tutorial","archived":false,"fork":false,"pushed_at":"2020-05-18T05:42:54.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-30T08:35:13.874Z","etag":null,"topics":["docker","docker-compose","example","flask","flask-application","redis"],"latest_commit_sha":null,"homepage":"https://docs.docker.com/compose/gettingstarted/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macagua.png","metadata":{"files":{"readme":"README.rst","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":"2020-05-18T03:07:01.000Z","updated_at":"2020-05-18T05:42:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2b1d7d2-6109-499c-901a-4a81a25a772c","html_url":"https://github.com/macagua/example.dockercompose.getstarted","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/macagua/example.dockercompose.getstarted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macagua%2Fexample.dockercompose.getstarted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macagua%2Fexample.dockercompose.getstarted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macagua%2Fexample.dockercompose.getstarted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macagua%2Fexample.dockercompose.getstarted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macagua","download_url":"https://codeload.github.com/macagua/example.dockercompose.getstarted/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macagua%2Fexample.dockercompose.getstarted/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265562371,"owners_count":23788516,"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","example","flask","flask-application","redis"],"created_at":"2024-11-11T11:06:46.338Z","updated_at":"2025-12-30T22:07:11.249Z","avatar_url":"https://github.com/macagua.png","language":"Python","readme":"================================\nexample.dockercompose.getstarted\n================================\n\nExample from the `Get started with Docker Compose`_ Tutorial.\n\n\nFeatures\n========\n\n- `Flask`_ web application based.\n\n- `Redis`_ key-value store based.\n\n\nStarting project\n================\n\nFor starting your Docker containers project, executing the follow command:\n\n::\n\n  $ docker-compose -p composetest up -d\n\nIn this previous command you indicate with the parameter ``-p`` the\nname of the project as ``composetest``.\n\nWith the ``up`` option, let you to builds, (re)creates, starts, and attaches\nto containers for a service. also you indicate with the parameter ``-d``\nthat the start of the containers is in the background.\n\nIf all are ok, you can enter http://localhost:5000/ in a browser to see \nthe application running.\n\n\n.. image:: https://raw.githubusercontent.com/macagua/example.dockercompose.getstarted/master/docs/_static/screenshot_1.png\n   :height: 160px\n   :width: 486px\n   :alt: The Web container running\n   :align: left\n\n\nIf you refresh your browser the Web container return a new message, like this follow:\n\n.. image:: https://raw.githubusercontent.com/macagua/example.dockercompose.getstarted/master/docs/_static/screenshot_2.png\n   :height: 159px\n   :width: 486px\n   :alt: The Web container refreshed\n   :align: left\n\nListing images\n==============\n\nFor listing the Docker images used into your project, executing the follow command:\n\n::\n\n  $ docker-compose -p composetest images\n       Container          Repository       Tag       Image Id      Size  \n  -----------------------------------------------------------------------\n  composetest_redis_1   redis             alpine   b4ceee5c3fa3   30.2 MB\n  composetest_web_1     composetest_web   latest   31f31a6391ac   210 MB\n\n\nListing containers\n==================\n\nFor listing the Docker containers created into your project, executing the follow command:\n\n::\n\n  $ docker-compose -p composetest ps\n         Name                      Command               State           Ports         \n  -------------------------------------------------------------------------------------\n  composetest_redis_1   docker-entrypoint.sh redis ...   Up      6379/tcp              \n  composetest_web_1     flask run                        Up      0.0.0.0:5000-\u003e5000/tcp\n\n\nDisplay running processes\n=========================\n\nFor display the running processes into your Docker project, executing the follow command:\n\n::\n\n  $ docker-compose -p composetest top\n  composetest_redis_1\n  UID    PID    PPID    C   STIME   TTY     TIME         CMD     \n  ---------------------------------------------------------------\n  999   12431   12392   0   23:39   ?     00:00:00   redis-server\n  \n  composetest_web_1\n  UID     PID    PPID    C   STIME   TTY     TIME                          CMD                      \n  --------------------------------------------------------------------------------------------------\n  root   12424   12391   0   23:39   ?     00:00:00   /usr/local/bin/python /usr/local/bin/flask run\n\n\nRebuild image project\n=====================\n\nYou need rebuild your Docker image project when was changed, for that\nexecuting the follow command:\n\n::\n\n  $ docker-compose -p composetest up --build\n\nIn this previous command you indicate with the parameter ``-p`` the\nname of the project as ``composetest``, also you indicate with the\nparameter ``--build`` that to build images before starting containers.\n\n\nInspect service running\n=======================\n\nFor see what environment variables are available to the ``web`` service,\nexecuting the follow command:\n\n::\n\n  $ docker-compose -p composetest run web env\n  PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n  HOSTNAME=813f4a22d6c5\n  TERM=xterm\n  FLASK_ENV=development\n  LANG=C.UTF-8\n  GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D\n  PYTHON_VERSION=3.7.7\n  PYTHON_PIP_VERSION=20.1\n  PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/1fe530e9e3d800be94e04f6428460fc4fb94f5a9/get-pip.py\n  PYTHON_GET_PIP_SHA256=ce486cddac44e99496a702aa5c06c5028414ef48fdfd5242cd2fe559b13d4348\n  FLASK_APP=app.py\n  FLASK_RUN_HOST=0.0.0.0\n  HOME=/root\n\n\nStopping project\n================\n\nFor stopping your Docker containers project, executing the follow\ncommand:\n\n::\n\n  $ docker-compose -p composetest stop\n\nIn this previous command you indicate with the parameter ``-p`` the\nname of the project as ``composetest``.\n\nWith the ``stop`` option, let you to stop your running Docker\ncontainers without removing them. They can be started again with\nthe command ``docker-compose -p composetest start``.\n\n\nDowning containers\n==================\n\nFor bring everything down, removing the containers entirely, with the ``down``\ncommand. If you started your Docker Compose with ``docker-compose -p composetest up -d``\ncommand, stop your services once you've finished with them:\n\n::\n\n  $ docker-compose -p composetest down\n\nIn this previous command you indicate with the parameter ``-p`` the\nname of the project as ``composetest``.\n\nWith the ``down`` option, let you to stops containers and removes containers,\nnetworks, volumes, and images created by the ``up`` command option.\n\nPass the parameter ``--volumes`` to also remove the data volume used by the\ncontainer, executing the follow command:\n\n::\n\n  $ docker-compose -p composetest down --volumes\n\n\nContribute\n==========\n\n- `Source code @ GitHub \u003chttps://github.com/macagua/example.dockercompose.getstarted.git\u003e`_.\n- `Issues @ GitHub \u003chttps://github.com/macagua/example.dockercompose.getstarted/issues\u003e`_.\n\n\nLicense\n=======\n\nThe project is licensed under the MIT.\n\n.. _`Get started with Docker Compose`: https://docs.docker.com/compose/gettingstarted/\n.. _`Flask`: http://flask.pocoo.org/\n.. _`Redis`: https://redis.io/\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacagua%2Fexample.dockercompose.getstarted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacagua%2Fexample.dockercompose.getstarted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacagua%2Fexample.dockercompose.getstarted/lists"}