{"id":20004164,"url":"https://github.com/fffunction/setting-up-wagtail-with-docker","last_synced_at":"2025-10-03T16:27:42.462Z","repository":{"id":152172281,"uuid":"49067570","full_name":"fffunction/setting-up-wagtail-with-docker","owner":"fffunction","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-08T09:10:12.000Z","size":12,"stargazers_count":10,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-12T13:29:04.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/fffunction.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":"2016-01-05T13:29:21.000Z","updated_at":"2020-12-09T23:26:43.000Z","dependencies_parsed_at":"2023-04-18T07:01:01.084Z","dependency_job_id":null,"html_url":"https://github.com/fffunction/setting-up-wagtail-with-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/fffunction%2Fsetting-up-wagtail-with-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffunction%2Fsetting-up-wagtail-with-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffunction%2Fsetting-up-wagtail-with-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffunction%2Fsetting-up-wagtail-with-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fffunction","download_url":"https://codeload.github.com/fffunction/setting-up-wagtail-with-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241444037,"owners_count":19963748,"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":"2024-11-13T05:28:45.496Z","updated_at":"2025-10-03T16:27:42.387Z","avatar_url":"https://github.com/fffunction.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starting a Wagtail build\n\n## Prerequisites\n\n- [Docker for mac/Docker for windows](https://docs.docker.com/engine/installation/#/on-osx-and-windows)\n\n## Getting Running\n\n1. Go to folder you want to start a new project in. It doesn't have to be empty.\n2. Copy the `.dockerfile`, `docker-compose.yml`, and `requirements.txt` files included here into your directory.\n3. In a command line, `cd` to your project folder.\n4. `docker-compose build`\n5. `docker-compose run web wagtail start [projectname]`\n6. Move the contents of the new [projectname] folder out into the root\n7. Change the database settings in [projectname]/settings/base.py to use `dj_database_url` [Link to example config](#dj_database_url-config)\n8. `docker-compose run web ./manage.py migrate`\n9. `docker-compose run web ./manage.py createsuperuser`\n10. `docker-compose up` and your Wagtail admin will be running at `http://localhost/admin` (if you use the default docker ip)\n\n### Optional\n\nUpdate your `STATICFILES_DIRS`, `STATIC_ROOT`, `STATIC_URL`, `MEDIA_ROOT`, `MEDIA_URL` variables.\n\n## Custom Branding\n\n1. Create a new app called `dashboard` to hold your custom wagtail branding templates. This is done with `docker-compose run web django startapp dashboard`\n2. Copy the `dashboard/templates` folder from this repo into your own dashboard folder.\n3. Point the image sources in these tempates to a logo and change `[project name]` to a suitable name.\n4. Add `'dashboard'` to the `INSTALLED_APPS` in `base.py` making sure `'overextends','dashboard',` comes before `'wagtail.wagtailadmin','wagtail.wagtailcore',`.\n\n## Set up for Dokku deployment\n\nRequired files:\n\n - Procfile (requires pointing to the correct wsgi file)\n - runtime.txt (requires setting to correct env)\n - wsgi.py changes [Link to config](#wsgipy-config)\n\n1. Add the dokku server to your remotes. `git remote add dokku dokku@server.com:[appname]`\n2. Push to dokku. `git push dokku [currentbranch]:master`\n3. Either import a database with pgAdmin or run the `migrate` and `createsuperuser` commands details above\n\n___\n\n## Misc\n\n### dj_database_url config\n\n```python\nimport dj_database_url\n\nDATABASES = {\n    'default': dj_database_url.config()\n}\n```\n\n### wsgi.py config\n\nReplace with the following:\n\n```python\nimport os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"[APPNAME].settings\")\n\nfrom django.core.wsgi import get_wsgi_application\nfrom whitenoise.django import DjangoWhiteNoise\n\napplication = get_wsgi_application()\napplication = DjangoWhiteNoise(application)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffffunction%2Fsetting-up-wagtail-with-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffffunction%2Fsetting-up-wagtail-with-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffffunction%2Fsetting-up-wagtail-with-docker/lists"}