Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newamericafoundation/newamerica-cms
CMS for New America
https://github.com/newamericafoundation/newamerica-cms
Last synced: about 17 hours ago
JSON representation
CMS for New America
- Host: GitHub
- URL: https://github.com/newamericafoundation/newamerica-cms
- Owner: newamericafoundation
- Created: 2015-12-21T16:04:46.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T05:41:56.000Z (3 months ago)
- Last Synced: 2024-10-18T10:45:01.401Z (3 months ago)
- Language: Python
- Homepage: https://www.newamerica.org/
- Size: 46.2 MB
- Stars: 5
- Watchers: 14
- Forks: 5
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Custom Content Management System (CMS) built for New America
## Contents
- [First time setup](#first-time-setup)
- [Dependencies](#updating-dependencies)## Setup
### Dependencies
This software should be installed on your computer:
1. [Docker](https://docs.docker.com/engine/installation/)
### First-time setup script
From inside the repo, run the setup script, which automates several steps needed to configure your environment so that the Docker containers can build successfully.
```shell
./setup.sh
```### Starting the environment
This command will start the web, database, elastic search, and redis
servers needed for the site to operate:```shell
docker compose up
```The containers can also be run in detached mode with `docker compose up -d`. In the default mode, you see all the logs and output from the containers in the shell and will stop running with Control+C. Running with `-d` will cause docker compose to exit, but the containers will run in the background. They can be stopped with `docker compose down`.
The site will not immediately work without existing page data. You can download this from the staging or production environments using Fabric commands. Many of these commands require you be logged into Heroku, which you can do with this command:
```shell
docker compose exec web heroku login
```Once the login is complete, you can use Fabric on the web container to obtain data from various sources. For example:
```shell
docker compose exec web fab pull-production-data
```Other Fabric commands can be listed with
```shell
docker compose exec web fab -l
```### Visiting the site locally
After you have pull down data, you should be able to visit the Wagtail site at http://localhost:8000/
## Updating dependencies
The "docker build" command below will create new `requirements.txt` (for production -- Heroku requires this file to be in the root of the project folder hierarchy) and `requirements/local-dev.txt` (for development) and `requirements/ci.txt` (for use with continuous integration services) from the information in `pyproject.toml`.
```
docker build --target=requirements-artifacts -f ./docker/Dockerfile --output type=local,dest=. .
```To change a requirement, update the version boundaries in the `project.dependencies` or appropriate key in `project.optional-dependencies` in `pyproject.toml` and re-run the docker build command.