Giter VIP home page Giter VIP logo

wagtail-example's Introduction

Getting started with Lagoon & Wagtail

This is a simple example demonstrating how to get Wagtail running on Lagoon.

The important files to examine are

  • ./docker-compose.yml
  • ./.lagoon.yml
  • mysite/mysite/settings/base.py

Please note this example is purely for demonstration and not suitable for production without some knowledge of Wagtail and Django.

Getting Started

  • Open up a command line prompt.
  • Clone the repo.
  • cd into the repo.
  • Run docker compose build to build the containers
  • Run docker compose up -d to stand up the wagtail stack

You can interact with your site using docker compose exec python sh and /code/mysite/manage.py to see the admin options for wagtail

Included Services

This example contains the following services:

  • Python 3.11
  • PostgreSQL 15

To see similar projects with additional services, please visit https://github.com/lagoon-examples and to find out more about the services, please visit the documentation at https://docs.lagoon.sh/lagoon

The mysite folder

The main wagtail project is inside the mysite folder - created using a wagtail start mysite2 command. The only config modification from the standard installed version is the database stanza, which has been edited to refer to the PostgreSQL database connection in mysite/mysite/settings/base.py utilizing dj_database_url to read the DATABASE_URL created in the .lagoon.env file, which is populated in the docker container entrypoint.

# Database
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases

import dj_database_url

DATABASES = {
    'default': dj_database_url.config(
        conn_max_age=600,
        conn_health_checks=True,
    ),
}

Wagtail and uWSGI

This example utilises uWSGI with Wagtail.

The Wagtail project is copied into the Dockerfile from the host, has its relevant dependencies installed and served via uWSGI.

Contributions

We welcome any contributions to our example projects - please feel free to raise an issue or pull request and we will work with you to improve!

wagtail-example's People

Contributors

cgoodwin90 avatar tobybellwood avatar

Watchers

 avatar  avatar

Forkers

tobybellwood

wagtail-example's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
lagoon/Dockerfile
github-actions
.github/workflows/wagtail-example.yaml
  • actions/checkout v3
pip_requirements
requirements.txt

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.