Skip to content
/ cms Public

Content Management System based on Django CMS

Notifications You must be signed in to change notification settings

retool-it/cms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title author date
cms
Zachary Wilson
2017-08-26 00:00:00 UTC

CMS

A lightweight, ready-to-deploy, containerized content management system and "production-ready" stack environment implementing recommended deployment best practices.

Install

git clone https://github.com/retool-solutions/cms

Features

Docker Containers!

  1. Gunicorn WSGI serving Django CMS
  2. Networked to PostgreSQL Database instance
  3. Proxied to port 80 by NGINX webserver

Prerequisites

  1. Docker CE
  2. AWS EC2 instance created w/ docker-machine

Usage

Go from localhost to the host you love most.

$ eval $(docker-machine env production)
$ docker stack deploy -c docker-compose.yml stack

Deploying

I'm working on making deployment happen w/o manual intervention. For now, there are a few manual steps required before deploying this stack to a server for the first time, namely:

  1. NGINX configuration file must exist either in the image or on the server where the containers will be deployed
  2. After deploying the stack, you must migrate your django db and create a new superuser to log into the admin site

These are described in further detail below.

Prep

Copy ./config/nginx/default.conf to the server

$ cd ./config/nginx
$ docker-machine scp default.conf production:~
$ docker-machine ssh production docker config create default.conf /users/home/ubuntu/default.conf

Where server is the name of the production server.

Deploy

Deploy the stack

eval (docker-machine env production)
docker stack deploy -c docker-compose.yml stack

Migrate your db

docker exec stack_app_1 python manage.py migrate

Create a new superuser

docker exec -it stack_app_1 python manage.py createsuperuser

Reference