{"id":26817309,"url":"https://github.com/willandskill/example-django-barebone-docker","last_synced_at":"2025-08-08T19:14:12.326Z","repository":{"id":41920262,"uuid":"235277554","full_name":"willandskill/example-django-barebone-docker","owner":"willandskill","description":"A barebone Django project with instructions for how to run it with Docker and on Zeit Now","archived":false,"fork":false,"pushed_at":"2023-04-21T20:45:25.000Z","size":10,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-19T03:34:05.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"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/willandskill.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}},"created_at":"2020-01-21T07:11:10.000Z","updated_at":"2020-01-22T09:41:04.000Z","dependencies_parsed_at":"2022-08-11T22:00:50.920Z","dependency_job_id":null,"html_url":"https://github.com/willandskill/example-django-barebone-docker","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/willandskill%2Fexample-django-barebone-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willandskill%2Fexample-django-barebone-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willandskill%2Fexample-django-barebone-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willandskill%2Fexample-django-barebone-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willandskill","download_url":"https://codeload.github.com/willandskill/example-django-barebone-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273551,"owners_count":20750906,"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":[],"created_at":"2025-03-30T04:15:59.999Z","updated_at":"2025-03-30T04:16:00.657Z","avatar_url":"https://github.com/willandskill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-barebone\n\nA barebone Django project that only imports the most basic stuff in order to get Django up and running.\n\n## Why?\n\nThis is perfect for building small apps that is supposed to do something very simple at first and then slowly grow into a full fledged app.\n\n\u003e This project is a barebone example of how Django can be used to create very small and efficient apps. From a code structure point of view, it is suboptimal. Please make sure to check the template for a normal Django project in order to see how things should be separated into conveniently named files.\n\n## Get started\n\n1. Create a virtual enviroment and activate it\n\n```\npython3 -m venv barebone-env\nsource barebone-env/bin/activate\n```\n\n2. Install Django\n\n```\npip install django\n```\n\n3. Run the development server\n\n```\npython barebone.py runserver\n```\n\n---\n\n## Build and run it with Docker\n\n#### Build it via the local `Dockerfile`\n\n```\ndocker build -t djangoapp .\n```\n\n#### And then run it on port 8000\n\n```\ndocker run -d -p 8000:8000 djangoapp\n```\n\nGo to http://localhost:8000 to see that the app works\n\n#### Jump into the running Docker container\n\nYou can run `docker ps` in order to see all the running containers\n\n```\ndocker ps\n```\n\nAnd the output should be something similar to the one below\n\n```\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES\n0f61b4378dc3        django              \"uwsgi --http :8000 …\"   28 minutes ago      Up 28 minutes       0.0.0.0:8000-\u003e8000/tcp   awesome_perlman\n```\n\nAnd after that if You want to jump into an interactive shell You can run the command below\n\n```\ndocker exec -it awesome_perlman /bin/bash\n```\n\nYou can also run a single command like below, in our example we want to see all the files in our root folder\n\n```\ndocker exec -it awesome_perlman ls\n```\n\nAnd the output is\n\n```\nDockerfile  README.md  __pycache__  barebone.py  now.json  requirements.txt\n```\n\n---\n\n## Run it on Zeit Now\n\nRun it in `development` mode\n\n```\nnow dev\n```\n\nPush a version to `now`\n\n```\nnow\n```\n\nPush a version to `production`\n\n```\nnow --prod\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillandskill%2Fexample-django-barebone-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillandskill%2Fexample-django-barebone-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillandskill%2Fexample-django-barebone-docker/lists"}